nunuhara / alice-tools

Tools for extracting/editing files from AliceSoft games.
GNU General Public License v2.0
131 stars 19 forks source link

Convert all command line arguments from UTF-16 to UTF-8 on Windows #49

Closed kichikuou closed 1 year ago

kichikuou commented 1 year ago

Instead of converting to UTF-8 individually in subcommands, reset all pointers in argv to UTF-8 strings at startup.

This also allows characters that are not in the current system codepage to be used on the command line.

Note that SDL2 does this under the hood so in xsystem4 we can assume that argv is all in UTF-8. https://github.com/libsdl-org/SDL/blob/SDL2/src/main/windows/SDL_windows_main.c

nunuhara commented 1 year ago

Oops, I missed this PR somehow. Thanks!