Hi Ticker,

maybe show a warning message (once) when --lower-case is used without 
--code-page or with code-page=0?

I've modified the unit test:
- actual/expected where reversed
- better(?) explanation for length differences

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-boun...@lists.mkgmap.org.uk> im Auftrag von Ticker 
Berkin <rwb-mkg...@jagit.co.uk>
Gesendet: Montag, 29. November 2021 10:15
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Format6Encoder/Decoder

Hi Gerd

Yes, my mistake that --lower-case got ignored; I had forgotten that
LBLFile didn't call setUpperCase(false).

After this, I decided that it was better to make the encoder's letter-
case default the same as the other encoders and be explicit in
CodeFunctionsTest as to what was required for the test to work, so this
change is in the patch. I've also put in asserts to check that nothing
has re-represented the test strings with/without the COMBINING
DIAERESIS.

It doesn't make much sense to use --lower-case with this encoder, but
if that's what the user asks for (maybe there are other reasons), I
think it should do it.

FORMAT6 handles all the printable characters in the ASCII / 7-bit
range. From my tests on UK devices/software, where there are spaces is
the SYMBOL and LOWERCASE tables, the encoded value also shows as a
space. It is possible they might be used for country specific chars,
but, even if they do, mkgmap shouldn't use them. So what you see with
accents etc is what I'd expect.

Ticker

On Sun, 2021-11-28 at 15:57 +0000, Gerd Petermann wrote:
> Hi Ticker,
>
> with the 2nd version of the patch the --lower-case option is ignored.
> This was probably not intended but I think it really makes no sense
> to implement this.
> The img file is much bigger and German names like Hauptstraße is
> still translated to Hauptstrasse,
> "Am Düker" still gets "Am Duker", so the displayed names are
> typically the same, at least with
> Garmin software.
>
> Attached is my proposed fix if you still think --lower-case should be
> supported with codepage 0
>
> Gerd
>
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-boun...@lists.mkgmap.org.uk> im Auftrag
> von Ticker Berkin <rwb-mkg...@jagit.co.uk>
> Gesendet: Freitag, 26. November 2021 22:18
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Format6Encoder/Decoder
>
> Hi Gerd
>
> Patch attached that defaults Format6Encoder transliterator to UPPER.
> mkgmap unconditionally calls to set required mode but test
> environment
> doesn't.
>
> Ticker
>
> On Fri, 2021-11-26 at 18:40 +0000, Gerd Petermann wrote:
> > Hi Ticker,
> >
> > result looks ok, but unit test CodeFunctionsTest fails. Maybe it
> > was
> > intended that codepage 0 ignores the --lower-case option?
> >
> > Gerd
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Attachment: format6-v5.patch
Description: format6-v5.patch

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to