Open lingsamuel opened 5 years ago
Are you able to create file and folder names with Chinese characters directly in the operating system?
the same problem with the Russian language
I think this is a Windows specific issue. At least I can create directories with Kanji on my system.
Nope. I tested in Arch Linux:
❯ uname -a
Linux sarasaarch 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux
:thinking: how can you save with kanji? According to the code posted above, saved file name can only be ASCII and digits and underline.
This function sounds a little unreasonable. It should escape forbidden characters like /
on Linux and keep others as is.
At least on Linux, filename is stored in bytes, even if the filesystem doesn't support UTF-8. The only constraint is slash and NUL character.
@lingsamuel I tried creating a directory with Kanji from terminal which works. I didn't check the code first for a replacement. I partially agree that it shouldn't escape all characters except ASCII. But we have to check first if that is still compatible with the entries in a .zip file which manuskript uses for the single-file-mode. Besides we should still esacpe some more characters than related to the used operating system to ensure moving a project between operating systems leads to a crash or data loss.
Yes, forbidden characters should be a union of all platforms.
What do you mean "creating a directory with Kanji from terminal"? I think we are talking about save a manuskript project which contains non ASCII characters in filename and save it in multi-file mode, not terminal.
I was testing what gedakc mentioned.
Manuskript Version: Newest develop branch.