EasyRPG / Tools

Assorted tools to handle RPG Maker 2000/2003 files
https://easyrpg.org/tools/
49 stars 18 forks source link

lmu2png does not work with Japanese file names #61

Open EK720 opened 2 years ago

EK720 commented 2 years ago

I'm trying to convert maps in a Japanese RM2K game to png files for mapping purposes, but many of the maps give an error along the lines of "Can't find chipset ", even though the chipset is there in the files. Is there any way for me to solve this problem, or are there any alternative tools I could use to convert RPGM maps to images? image

Ghabry commented 2 years ago

Add -e 932 to the command line

ElTipejoLoco commented 9 months ago

image 夢箱-2.png exists in game directory's CharSet folder. Displays as û▓öá-2 without -e 932. Displays as σñóτ«▒-2 with -e 932. wataru 主人公 カヌー移動.png exists in game directory's CharSet folder. Displays as wataru ÄσÉlî÷ü@âJâkü[ê┌ô« without -e 932. Displays as wataru Σ╕╗Σ║║σà¼πÇÇπé½πâîπâ╝τº╗σïò with -e 932. Copying and pasting image files with the mis-encoded filenames into the appropriate directory and re-attempting will not result in them being found. I've only experienced LMU2PNG present this kind of issue. Is it possible that the encoding code somewhere in either liblcf's detection of encoding or its usage specific to populating strings here is not working as expected? I mainly figure it must be the issue if specifying the Shift-JIS's code page is actually changing the behavior (though using external encoding/decoding tools implies the file names would turn into what's being displayed if the CLI attempted to display them in IBM00858's, in my case, whereas the filenames that appear when specifying the Shift-JIS code page don't). I'm assuming the issue is somewhere in the population of the strings before they're fed to FindResource(), and I'm hoping it's somewhere here rather than further upstream in liblcf. This is a non-issue for missing ChipSet files thanks to the -c option, though these too will fail if they're not renamed to have filenames with only UTF-8 valid characters when specified. Unfortunately, Panoramas aside it feels like it'd be a terrible idea to implement a workaround for CharSet issues as there would possibly need to be a prompt for every time a unique file's failed to be found, which could get ridiculous for cases such as EK720's.