EasyRPG / liblcf

Library to handle RPG Maker 2000/2003 and EasyRPG projects
https://easyrpg.org
MIT License
116 stars 55 forks source link

lcf2xml seems to use incorrect string encoding #475

Closed omoflop closed 6 months ago

omoflop commented 8 months ago

After doing some testing, I've noticed that lcf2xml is reading strings as windows-1258 encoding when they're actually sjis.

For example, lcf2xml on Yume 2kki's RPG_RT.ldb file displays chipset id 181's name as 20_Chipset_10_loda_ƒ‰ƒt‰æÔ‚¢X as the chipset name. However, the actual name of the file is 20_Chipset_10_loda_ラフ画赤い街.

It is also not limited to chipsets, but charsets and presumably anything else with strings is affected as well.

I am not aware of how rpgmaker formats its files so it might be harder than just changing the encoding somewhere, but I haven't been able to find a workaround so I'm asking for a potential bugfix/help here.

Ghabry commented 7 months ago

lcf2xml does not do encoding detection because this would slowdown everything (it must parse the database etc. every time). It always uses your local platform encoding.

You can override it on the command line lcf2xml.exe --encoding 932 FILE or edit RPG_RT.ini:

[EasyRPG]
Encoding=932

Note that this ini setting is also used by the Player itself to skip the detection step.

Ghabry commented 6 months ago

Closing this because this is intentional behaviour and you can workaround it