Enigma
Enigma copied to clipboard
Errors when trying to read a directory with Japanese filenames
Exception in thread "Basic L&F File Loading Thread" java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/distant/????????????????????????
at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:121)
at java.base/sun.nio.fs.UnixPath.
I had a Tiny file in my home, but it refused to read the folder and spammed this in console until I moved the non-Latin files.
Hmm, I typed some random Japanese through google translate for directory name, and I can load it with enigma. I am on windows and java 17. Unfortunately I don't have a linux environment to test. java 18 has a utf-8 by default feature (jep 400); can you try with java 18?
Also make sure your directory names are in some compatible encoding. I know some non-english file names can have their names messed up, such as after extraction from zip or rar files.
@liach I have the same problem on Java 18, and the file names are in Katakana. However I've been able to confirm that it also fails with Chinese and Korean filenames as well.
Might be a system locale issue, I've encountered problems with non-ascii file names when the locale was set up incorrectly (e.g. using a non-UTF8 locale or a locale that doesn't exist on the system because it wasn't generated or something like that), though I don't know if Java uses libc locale at all in any way. What's the output of running locale in a terminal?
Might be a system locale issue, I've encountered problems with non-ascii file names when the locale was set up incorrectly (e.g. using a non-UTF8 locale or a locale that doesn't exist on the system because it wasn't generated or something like that), though I don't know if Java uses libc locale at all in any way. What's the output of running
localein a terminal?
Yeah those "No such file or directory" messages do seem like that is the problem. Could you also send the output of locale?
Yeah those "No such file or directory" messages do seem like that is the problem. Could you also send the output of
locale?
These should say "ja_JP.UTF-8" instead of "ja_JP". Change it wherever you set that up initially (don't forget to log out and back in to reload the environment). That should fix it.
These should say "ja_JP.UTF-8" instead of "ja_JP". Change it wherever you set that up initially (don't forget to log out and back in to reload the environment). That should fix it.
I set these via Plasma System Settings, I actually don't know how to change it manually.
Interesting, that's probably a Plasma bug then, probably worth reporting (though for me it shows them all as having a UTF-8 suffix... not sure what's different between our installations).
Either change those back to the defaults (Reset button on the bottom panel in System Settings/Formats) and then depending on your distro, configure the system locale (see distro documentation for that, since it's specific to each one).
Otherwise, you could try setting the correct locale names in ~/.config/plasma-localerc (I assume there they don't have the UTF-8 suffix either), but I'm not sure if that will work.

