<html><head></head><body>Hi<br><br>I'll be able to take a look later this evening. I think it is just all sign extension problems.<br><br>Steve<br><br><div class="gmail_quote">On 8 April 2019 11:50:58 BST, Gerd Petermann <gpetermann_muenchen@hotmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi Ticker,<br><br>sorry, can't help with this part of the source.<br><br>@Steve: Please help<br><br>Gerd<hr>Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap@jagit.co.uk><br>Gesendet: Montag, 8. April 2019 12:38<br>An: Development list for mkgmap<br>Betreff: Re: [mkgmap-dev] Building map with Hebrew characters<br><br>Hi Gerd and Nick<br><br>@nick, when you say it works on 4143 but not on 4179, did you test code<br>-page=1255 on 4143, or just unicode?<br><br>It looks like there are 2 problems.<br><br>The --unicode assertion error is a 'byte' to 'int' sign-extension<br>problem, introduced in r4167 or r4168 and I've attached a patch that<br>fixes this and also removes some other confusing/obscuring type<br>representation changes in this area of the code.<br><br>The patch also has 4 commented out (because not appropriate for -<br>-unicode) asserts that seem to point to the Hebrew/1255 problem being<br>in imgfmt/app/srt/Sort.java:finish():<br><br>$ java -ea -jar /mkgmap/mkgmap.jar --code-page=1255 --gmapsupp test<br>-map:all-elements<br><br>Time started: Mon Apr 08 09:30:06 BST 2019<br>Exception in thread "main" java.lang.AssertionError: 16<br>        at<br>uk.me.parabola.imgfmt.app.srt.Sort$Page.setSecondary(Sort.java:642)<br>        at uk.me.parabola.imgfmt.app.srt.Sort.finish(Sort.java:161)<br>        at<br>uk.me.parabola.mkgmap.srt.SrtTextReader.read(SrtTextReader.java:182)<br>        at<br>uk.me.parabola.mkgmap.srt.SrtTextReader.<init>(SrtTextReader.java:117)<br>        at<br>uk.me.parabola.mkgmap.srt.SrtTextReader.<init>(SrtTextReader.java:106)<br>        at<br>uk.me.parabola.mkgmap.srt.SrtTextReader.sortForCodepage(SrtTextReader.j<br>ava:141)<br>        at uk.me.parabola.mkgmap.main.Main.getSort(Main.java:764)<br>        at<br>uk.me.parabola.mkgmap.main.Main.processFilename(Main.java:283)<br>        at<br>uk.me.parabola.mkgmap.CommandArgsReader$Filename.processArg(CommandArgs<br>Reader.java:272)<br>        at<br>uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java<br>:125)<br>        at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:143)<br>        at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)<br><br>this is corresponds to:<br>                                        } else {<br><br>                                                p.setSecondary(i,<br>p.getSecondary(i) + maxSecondary);<br><br>   }<br><br>where this increase in the secondary value is governed by some bits in the pages.flags and the flags testing was changed in r3968, along with the introduction of the original assert that was failing (SRTFile.java:117) and quite a few other changes in srt.<br><br>@gerd, I'm afraid I don't understand the srt logic so can you have a<br>look at it<br><br>Regards<br>Ticker<br><br>On Sat, 2019-04-06 at 08:16 +0000, Gerd Petermann wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> Hi,<br> maybe a regression from r4167?<br> <a href="http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4167">http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=4167</a><br><br> Gerd<hr> Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag<br> von osm@pinns <osm@pinns.co.uk><br> Gesendet: Samstag, 6. April 2019 10:01<br> An: mkgmap-dev@lists.mkgmap.org.uk<br> Betreff: Re: [mkgmap-dev] Building map with Hebrew characters<br><br> Have done some checking using older versions<br><br> It works on 4143 but not on 4179<br><br> I'm afraid I don't have anything in between<br><br> r<br><br> Nick<br><br> On 05/04/2019 21:25, Carlos Dávila wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> I'm trying to build a map of Israel with Hebrew characters, but<br> using<br> --code-page=1255 a get the following assertion:<br><br> at<br> uk.me.parabola.imgfmt.app.srt.SRTFile.writeWeights(SRTFile.java:117<br> )<br>         at<br> uk.me.parabola.imgfmt.app.srt.SRTFile.writeSrt4Chars(SRTFile.java:9<br> 9)<br>         at<br> uk.me.parabola.imgfmt.app.srt.SRTFile.write(SRTFile.java:63)<br>         at<br> uk.me.parabola.mkgmap.combiners.MdrBuilder.init(MdrBuilder.java:117<br> )<br>         at<br> uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:605)<br>         at<br> uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.<br> java:128)<br>         at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:143)<br>         at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)<br><br> With --unicode I also get an assertion:<br> Exception in thread "main" java.lang.AssertionError: -125<br>         at<br> uk.me.parabola.imgfmt.app.BufferedImgFileWriter.put1u(BufferedImgFi<br> leWriter.java:154)<br>         at<br> uk.me.parabola.imgfmt.app.SectionWriter.put1u(SectionWriter.java:78<br> )<br>         at<br> uk.me.parabola.imgfmt.app.srt.SRTFile.writeWeights(SRTFile.java:113<br> )<br>         at<br> uk.me.parabola.imgfmt.app.srt.SRTFile.writeSrt8(SRTFile.java:166)<br>         at<br> uk.me.parabola.imgfmt.app.srt.SRTFile.write(SRTFile.java:68)<br>         at<br> uk.me.parabola.mkgmap.combiners.MdrBuilder.init(MdrBuilder.java:117<br> )<br>         at<br> uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:605)<br>         at<br> uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.<br> java:128)<br>         at uk.me.parabola.mkgmap.main.Main.mainStart(Main.java:143)<br>         at uk.me.parabola.mkgmap.main.Main.main(Main.java:114)<br><br> Probably I'm missing something obvious, but I always used<br> --code-page=1251 and have no idea what it may be<hr> mkgmap-dev mailing list<br> mkgmap-dev@lists.mkgmap.org.uk<br> <a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br></blockquote><hr>mkgmap-dev mailing list<br>mkgmap-dev@lists.mkgmap.org.uk<br><a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><hr>mkgmap-dev mailing list<br>mkgmap-dev@lists.mkgmap.org.uk<br><a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br></blockquote><hr>mkgmap-dev mailing list<br>mkgmap-dev@lists.mkgmap.org.uk<br><a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br></pre></blockquote></div></body></html>