ParadoxGameConverters / frontend

The frontend used by several of the converters
MIT License
4 stars 2 forks source link

Fix the localisation code #2

Open kratostatic opened 7 years ago

kratostatic commented 7 years ago

The localisation for special characters still doesn't work perfectly. It is capable of reading special characters in the save file pathway, but not within the configuration file.

IohannesIohannium commented 6 years ago

If #461 update looks like it solved it, this issue could be closed.

kratostatic commented 6 years ago

I'm not sure it did - I'm honestly getting confused but I think this is actually a frontend issue (the whole special characters in filenames not working problem.

Idhrendur commented 4 years ago

I've been looking at this again. I need to do some more research, but it appears Windows needs UTF-16 paths when handling anything non-ASCII. The converters would need to coordinate with the frontend on exactly how we want to format configuration files. Maybe include some metadata about paths? I'm not sure. I have a test program I've been working on that I need to complete so I have a good grasp of how it all works.

Zemurin commented 4 years ago

Not a frontend issue at all. For posterity:

Frontend correctly saves information in UTF8 configuration.txt, but the converters need to read those UTF8 strings, pipe the strings through std::filesystem::u8path() and then open directories and files for reading and writing using resulting std::filesystem::paths.

Current mechanism of passing SaveGame to the converter through argv doesn't work as accepting UTF8 (technically wstring, so utf-16) filenames requires wmain() wargv and is rather incompatible with anything non-windows. Savegame must go through configuration.txt same as other paths.