logo separator

[mkgmap-dev] Format6Encoder/Decoder

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Nov 30 10:20:13 GMT 2021

Hi Ticker,

I also don't like that we still use e.g.  Charset.forName("ascii") instead of StandardCharsets.US_ASCII, esp. because "ascii" is also used as name for our own resource files.

In what situation do you see wrong encoding of Mdr15/Mdr17?

Gerd

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

Hi Gerd

I don't like the idea of these static warnings and I doubt if this
combination is likely to be given. However I have added a note to
options.txt and corrected / expanded the text in this area.

I've incorporated you changes to the unit test.

Not related to this patch, but to code-page naming generally, is that
it is a mess. Sometimes "cp0" means 7-bit ASCII in 8 bits and "ascii"
means Format6. Combiners/Mdr seems to have been confused by this and,
when the LBL section is Format6, Mdr15 and Mdr17 (I think) contain 8-
bit ASCII strings.

Ticker

On Mon, 2021-11-29 at 09:47 +0000, Gerd Petermann wrote:
> 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-bounces at lists.mkgmap.org.uk> im Auftrag
> von Ticker Berkin <rwb-mkgmap at 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-bounces at lists.mkgmap.org.uk> im Auftrag
> > von Ticker Berkin <rwb-mkgmap at 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 at lists.mkgmap.org.uk
> > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



More information about the mkgmap-dev mailing list