Cubitect / cubiomes-viewer

An efficient graphical Minecraft seed finder and map viewer.
GNU General Public License v3.0
1.03k stars 61 forks source link

Bug report: Importing seed lists fails when file path contains Unicode characters #151

Closed Nel-S closed 2 years ago

Nel-S commented 2 years ago

This bug is pretty much what it says on the tin: I currently have a user profile on my laptop whose folder name is a Unicode character (the result of a very poor choice on my part when I first bought the laptop), and any attempts to import seed lists from said user profile results in a "Failed to load 64-bit seed list from file: [PATH]" error message, while the same file is able to be loaded from any other directory. The bug has a relatively simple workaround in the meantime--simply save the file elsewhere--but it would be nice to save the lists alongside my other data if this is ever able to be fixed.

Error

(If that feature is imported from another repository instead of being hard-coded in the program, let me know and I'll submit this bug report there instead.)

Cubitect commented 2 years ago

Text encoding is a deep rabbit hole. A major problem is that Windows is the only thing using UTF-16 encoding, while UNIX, the internet and everyone else uses UTF-8, because it's superior in pretty much every way. I expect you will find that a lot of programs will have issues with such characters in filenames, especially since UTF-16 in not compatible with most C standard library functions. In recent years Microsoft implemented a compatibility layer (UTF-8 code pages) which are still not ideal. But I have done what I can to support them now with patch v2.3.2.