Hi all,
I dont know if this has been raised before but even mkgmap-1655 could not produce an .IMG with proper Japanese character encoding.
I see the code assumes ENCODING_FORMAT9 when the specified --charset falls into the "any" category. The function CodeFunctions.guessCodePage() is also rather limited.
To get an .IMG with the correct Japanese encoding, the correct settings are: ENCODING_FORMAT10 img encoding / Codepage 932 / SJIS/MS932 character encoding.
I've added this IF-block into CodeFunctions.createEncoderForLBL():
} else if ("sjis".equals(charset) || "ms932".equals(charset)) {
funcs.setEncodingType(ENCODING_FORMAT10);
funcs.setEncoder(new AnyCharsetDecoder(charset));
funcs.setCodepage(932);
}
An alternative is to allow explicit setting of encodingType (FORMAT6/9/10) from the command line. I see there is already a --code-page command line parameter and maybe this explicit value (if set) should override guessCodePage().
Cheers
ettan