logo separator

[mkgmap-dev] [PATCH] Translating curly quotes into straight ones

From Marko Mäkelä marko.makela at iki.fi on Sat May 9 21:46:54 BST 2009

On Mon, May 04, 2009 at 11:24:00AM +0300, Marko Mäkelä wrote:
> I haven’t had problems with äö with mkgmap-r1024 --latin1, but I did
> notice that the UTF-8 apostrophe ’ (U+2019), properly mapped to 0x92,
> is displayed as the font substitution character by the Edge 705.
> It should probably be mapped to the straight single quote ' (U+0027).
> I'd suggest this translation for all the funny quotes:
> map U+2018..U+201B (‘’‚‛) to ' (U+0027)
> map U+201C..U+201F (“”„‟) to " (U+0022)

I tried the attached patch, but it is not working.  If I get around to
it, I will test this with a smaller input file again (not the whole
Finland).  I was using --latin1, and according to my understanding of
CodeFunctions.createEncoderForLBL(), it should create a
new AnyCharsetEncoder("cp1252").  However, the patch is apparently
not translating the cp1252-encoded ’ into ' (U+0027).

Also, I would rather perform the translation before the utf8-to-cp1252 step
or integrate it in a custom utf-8-to-cp1252 translation that does not
depend on java.nio.charset.Charset.  I’m only posting this patch as
“work in progress.”

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cp1252-quotes.patch
Type: text/x-diff
Size: 925 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090509/54b34500/attachment.bin 

More information about the mkgmap-dev mailing list