dst_enc wasn't converted to the proper names ICU/iconv expect #139

Merged
merged 2 commits into from May 12, 2015

Projects

None yet

2 participants

@Ghabry
Member
Ghabry commented May 10, 2015

No idea if this also fixes saving in emscripten... but is possible

Should fix saving when the encoding was specified in the INI (why was this never noticed) (fixes EasyRPG/Player#465).

@fdelapena
Member

It does not work for me with Don's adventures with existing Encoding=1251, after building and installing ghabry-liblcf:development and rebuilding a clean player linked with it they are being saved corrupted yet.

@Ghabry
Member
Ghabry commented May 12, 2015

Saving was totally broken when passed via "--encoding", because it will just use the original value, e.g. "1252" which is invalid to ICU/iconv.
This got fixed by passing dst_enc to CodepageToEncoding.
The same bug wasn't visible for the ini-case, because GetEncoding called CodepageToEncoding already. So saving worked for encoding that have a specific hardcoded mapping (932 and 949 have these), like Japanese, but Russian just got windows-1252, which is ambigious. Ambigious was already accepted for the src, but not for the dst case.
To sum up: When you had a russian game and it was NOT autodetected, then saving failed.

@fdelapena fdelapena added this to the 0.3 milestone May 12, 2015
@fdelapena fdelapena merged commit c08bfc7 into EasyRPG:master May 12, 2015

1 check passed

default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment