logo separator

[mkgmap-dev] Character set translations

From Marko Mäkelä marko.makela at iki.fi on Wed May 6 21:34:21 BST 2009

On Thu, Apr 16, 2009 at 06:08:06PM +0100, Steve Ratcliffe wrote:
> > Probably, mkgmap should make some effort to automatically write a  
> > sensible code page -- how are the options latin1, charset and code-page 
> > meant to work together? Does one affect input, the other output?
> 
> Its mostly historical when I didn't fully understand what was required.
> The two things were selecting between the 6 bit format and the 8 bit format
> and then getting the correct character set for the 8 bit format.

Is ENCODING_FORMAT9 the 8-bit format?

What is ENCODING_FORMAT10 and which devices do support it?  I just tried
generating a map with --charset=unicode, but the Garmin Edge 705 appears
to display non-ASCII characters as if they were UTF-8 encoded strings
misinterpreted as cp1252 (latin1).  For instance, 'ä' looks like 'ä'
except that the generic currency symbol ¤ is displayed as the
substitution character �.

Where would you implement the fixups for unsupported cp1252 characters?
I noticed that the code relies on java.nio.charset.Charset for doing the
translations.  Is it table-driven, and if so, is it possible to tweak the
translation tables?  Else, is there an efficient Java library function for
replacing all occurrences of a given character (e.g., replacing
0x91 and 0x92 with 0x27)?

	Marko



More information about the mkgmap-dev mailing list