Far-east asia character encoding

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

Hello
I dont know if this has been raised before but even mkgmap-1655 could not produce an .IMG with proper Japanese character encoding.
Do you have a Garmin unit that displays Japanese characters? It would be great to get this working, but I've never had any way of testing it.
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); }
Yes you need to stop it falling into the Any case, so that looks like the correct change to make. So is it the case that this change is working and ready to be committed? ..Steve

Sorry I don't have a Japanese Garmin to test with. I was just using GPSMapEdit on English Windows with Japanese fonts installed. Maybe we shouldn't check the code in until it's verified to work on Garmin devices. Cheers ________________________________ From: Steve Ratcliffe <steve@parabola.me.uk> To: mkgmap-dev@lists.mkgmap.org.uk Sent: Tue, 20 July, 2010 7:04:15 AM Subject: Re: [mkgmap-dev] Far-east asia character encoding Hello
I dont know if this has been raised before but even mkgmap-1655 could not produce an .IMG with proper Japanese character encoding.
Do you have a Garmin unit that displays Japanese characters? It would be great to get this working, but I've never had any way of testing it.
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); }
Yes you need to stop it falling into the Any case, so that looks like the correct change to make. So is it the case that this change is working and ready to be committed? ..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On 20/07/10 02:53, Tan, Eng Ten wrote:
Sorry I don't have a Japanese Garmin to test with. I was just using GPSMapEdit on English Windows with Japanese fonts installed.
Maybe we shouldn't check the code in until it's verified to work on Garmin devices.
Or if it worked with MapSource that would be OK too. ..Steve
participants (2)
-
Steve Ratcliffe
-
Tan, Eng Ten