Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread titles with invalid characters in Windows export with MS-DOS like names #1275

Open
4 of 6 tasks
DannyDorito24 opened this issue Aug 19, 2024 · 10 comments
Open
4 of 6 tasks

Comments

@DannyDorito24
Copy link

Version

2.43.3

Flavor

CLI (Command-Line Interface)

Platform

Ubuntu/MacOS

Export format

JSON

Steps to reproduce

Create threads with illegal filename characters (i.e. ? " / | : etc), export them, and threads containing those characters in their names will end up with 8 character names with a ~ character in them, much like old truncated MS-DOS names. (Example image attached)

Details

I don't think this is a duplicate, but it's possible my search was incomplete as I'm not really sure how to describe the issue.

The most logical way to fix this, as I see it, would be to simply strip the illegal characters out of the filename. While not ideal, I imagine this is a limitation of .NET even on systems that support these characters (macOS and most Linux distros). Currently it is not ideal to browse through threads with names like this due to the fact that the truncated names don't seem to relate at all to what they were supposed to be named.

Example from a recent export I did of a large server:
Example of truncated names from an export

Oddly, .NET does not throw any error or warning related to this, so the diagnosis here is of my own deduction. This has happened for many versions now, for me at least, so while I assume it's something in .NET, I'm somewhat confused as to why it hasn't been reported before if this is truly not a duplicate issue. Perhaps it's something else in the chain, but this happens on multiple systems.

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the application
  • I have provided all the information needed to reproduce this bug as efficiently as possible
  • I have sponsored this project
  • I have not read any of the above and just checked all the boxes to submit the issue
@Tyrrrz
Copy link
Owner

Tyrrrz commented Aug 20, 2024

Can you provide examples of the actual thread names?

@DannyDorito24
Copy link
Author

"Where in the mc scource code are stronholds generated?" -> M3J8AK~K
"Can someone help me find the seed?" -> M4FRRX~4
"Can someone try find the NEW squid island world seed? Not the old one. The new one where they each" -> M6DBDK~9
"Help finding seed from MCPE 0.6.1 | Created between 3/4/13 & 3/5/13 (vids and world file)" -> M6J65P~G
<Thread name was a literal YouTube link> -> M7R5DI~A

And many more, all of them seem to have invalid characters for windows filenames. Also somewhat strange is the files have no extension when exported. Many of these threads are from a forum channel where anyone can open a request and so they aren't that important, but it's annoying and if this is wider spread than just me, I can see how it might be a bigger issue.

@Tyrrrz Tyrrrz changed the title Thread titles with invalid characters in windows export with MS-DOS like names Thread titles with invalid characters in Windows export with MS-DOS like names Nov 6, 2024
@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 7, 2024

I was not able to reproduce this issue. I created a thread entitled ? " / | > Start and the export resulted in a file named DiscordChatExporter Test Server - thread-tests - _ _ _ _ _ Start [1304125458324918394].html (illegal characters replaced by underscores).

It might be a Unix-specific issue. Can you upload the files that you experienced the issue with?

@DannyDorito24
Copy link
Author

DannyDorito24 commented Nov 7, 2024

Hmm. I just tested it again with a single channel export, and it worked. I'll try to redo the export I guess? This was a large server so it will most likely take a few days to export again.

This is one of the files that exhibits the issue from an export I did in August. I added the file extension since macOS threw a fit at trying to zip it (guess certain implementations of zip don't like tilde?) and GitHub doesn't support extensionless files.
Below it is one I did today on my Mac. No idea how it fixed itself unless it's a macOS vs Ubuntu issue, which again I'll have to check here in a bit.
M7R5DI~A.json
Bot asset server - general - This Thread has characters that Windows can't handle ?|}{+":';._,.)(!*@#^&% [1304157075600838746].json

Only other thing I can think is that somehow the filenames are handled differently between the single channel export and exporting an entire server with threads. I'm not super familiar with C# but I'll see if I can find anything in the code.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 13, 2024

@DannyDorito24 did it work on your second attempt?

@DannyDorito24
Copy link
Author

It just now finished, and unfortunately, it didn't. Something I forgot to include is that when exporting an entire server, it throws an error for forum channels, that they have to be exported separately:
Screenshot 2024-11-15 at 2 43 43 PM
However, these channels are present in the export and ones that don't have the presumably unsupported characters are perfectly fine, which is interesting.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 17, 2024

The forum channel errors are unrelated and can be safely ignored if you're doing exportall or exportguild.

Are you still getting truncated thread names?

@DannyDorito24
Copy link
Author

Yes, I've attached a few of them if it helps, but there's nothing obvious in the files to me other than the names.
Truncated Names.zip

@Tyrrrz
Copy link
Owner

Tyrrrz commented Nov 19, 2024

Hmm, can you share a server invite link? I can't reproduce it with threads on my own

@DannyDorito24
Copy link
Author

Yep, it's Minecraft@Home, https://discord.gg/xArErFf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants