
On Wed, May 06, 2009 at 11:34:21PM +0300, Marko Mäkelä wrote:
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?
Yes it is.
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
Certainly on my Legend there is no difference between format 9 and 10 either but it depends on the firmware for the device as far as I know.
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)?
Well if we know what is required we can do anything, if need be a new Charset could be created if the Garmins don't follow an existing one exactly. ..Steve