
Hi Gerd In the existing code, Mdr20, Mdr2x, and Mdr7 set the strength to SECONDARY, PrefixIndex set it to PRIMARY and Mdr5 didn't set it. The Java manual doesn't say what the default strength is for a new Collator: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/Colla... but I've seen reference to Collator.getInstance() being locale dependant and/or TERTIARY. Generally, SECONDARY distinguishes between accents and TERTIARY between case. Case-insensitive seems to be the correct option mkgmap / map indexing. Ticker On Thu, 2021-10-21 at 09:21 +0000, Gerd Petermann wrote:
Hi Ticker,
so far I don't understand most of the changes in mdrUnicode_v2.patch
Setting strength to SECONDARY (instead of the default TERTIARY) means that e.g. a and รค (German umlaut) are treated the same, right? Why do you describe it "generally case-insensitive"?
This doesn't seem to be related to unicode maps only, so I wonder what side effects this has.
Gerd
________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk> Gesendet: Mittwoch, 20. Oktober 2021 12:32 An: Development list for mkgmap; Steve Ratcliffe Betreff: Re: [mkgmap-dev] java.lang.AssertionError while building index from unicode tiles
Hi
In the changes I've just made, I hope I've been consistent and fixed all instances to use collator.compare() where scanning the results of a sort on the same table for a change. Also consistently setting strength to SECONDARY (generally case-insensitive).
There may be places where an indirect test should also use collator.compare(). Maybe this should be tackled next.
I didn't look at MdrCheck.
Ticker
On Wed, 2021-10-20 at 08:24 +0000, Gerd Petermann wrote:
Hi Ticker & Steve,
I don't understand the mixed use of collator.compare() and String.equals() in the Mdr classes. When we use the collator to sort the data we probably also have to use it to compare for equality while grouping?
I also see differences between the code in MdrCheck and the classes in mkgmap.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev