Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Support of special characters #135
I checked out easy rpg to use the import/export of maps between xml and lmu format.
void RawStructRPG::EventCommand::WriteLcf(const RPG::EventCommand& event_command, LcfWriter& stream)
in the file ldb_eventcommand.cpp
As I understand it, the maker prefixes each String with its length in characters
However, as special characters take more than one byte, the count is wrong (In lmu it is only one byte, probably encoded in Windows-1252 ).
To fix this, you could use w_char or some sort of different count.
It is possible that the same error happens with other strings written to lmu.
Thanks for tracking this down. We already encountered savegame corruption in another German game (Düsterburg) and couldnt figure out why. This could be the reason.
- stream.WriteInt(event_command.string.size()); + stream.WriteInt(stream.Decode(event_command.string).size());
RPG::EventCommand::WriteLcf(const RPG::EventCommand& event_command, LcfWriter& stream)
Note that we have two different issue trackers (one for Player, one for Readers).
Looks also wrong twice in
I tested it and it works like a charm.
Those two places you mentioned need to use
as well, otherwise the same error occurs with a charset or sound file name conatining special characters.