<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Hi Gerd,
</div>
<div class="default-style">
<br>
</div>
<div class="default-style">
Hungary and Romania work just fine. Thank you for your quick and uncomplicated help!
</div>
<div class="default-style">
<br>
</div>
<div class="default-style">
Arndt
</div>
<blockquote type="cite">
<div>
Gerd Petermann <<a href="mailto:gpetermann_muenchen@hotmail.com">gpetermann_muenchen@hotmail.com</a>> hat am 28.12.2021 14:22 geschrieben:
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
Hi Ticker,
</div>
<div>
<br>
</div>
<div>
okay, maybe you find time to implement a better solution.
</div>
<div>
I've committed the patch with r4838.
</div>
<div>
<br>
</div>
<div>
@Arndt: Please check if this solves the problems with your maps.
</div>
<div>
Not sure about this because you said mkgmap stops without any reaction
</div>
<div>
while this problem was a loop.
</div>
<div>
<br>
</div>
<div>
Gerd
</div>
<div>
<br>
</div>
<div>
________________________________________
</div>
<div>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Ticker Berkin <<a href="mailto:rwb-mkgmap@jagit.co.uk">rwb-mkgmap@jagit.co.uk</a>>
</div>
<div>
Gesendet: Dienstag, 28. Dezember 2021 13:20
</div>
<div>
An: Development list for mkgmap
</div>
<div>
Betreff: Re: [mkgmap-dev] r4836 stops Hungary & Romania
</div>
<div>
<br>
</div>
<div>
Hi Gerd
</div>
<div>
<br>
</div>
<div>
This fix is reasonable in the short term but has some problems:
</div>
<div>
<br>
</div>
<div>
If the invalid UTF16 string is output by other means (eg diagnostics),
</div>
<div>
it could cause a (more conventional) crash - but probably not looping.
</div>
<div>
<br>
</div>
<div>
Anything concatenated onto this string will be lost - this could be
</div>
<div>
fixed by initialising the encoder with
</div>
<div>
onMalformedInput(CodingErrorAction.IGNORE);
</div>
<div>
instead of catching the error.
</div>
<div>
<br>
</div>
<div>
The full fix would required looking at all substr and character
</div>
<div>
indexing operations on string data from OSM tags and using
</div>
<div>
Character.is[High/Low/]Surrogate() or similar logic and adjusting the
</div>
<div>
start/end char index or whatever
</div>
<div>
<br>
</div>
<div>
Ticker
</div>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
On Tue, 2021-12-28 at 07:23 +0000, Gerd Petermann wrote:
</div>
<blockquote type="cite">
<div>
Hi all,
</div>
</blockquote>
<blockquote type="cite">
<div>
I was able to reproduce with option --latin1 and the modified default
</div>
<div>
style.
</div>
</blockquote>
<blockquote type="cite">
<div>
The offending node seems to be
</div>
<div>
<a href="https://www.openstreetmap.org/node/9122388694" rel="noopener" target="_blank">https://www.openstreetmap.org/node/9122388694</a>
</div>
</blockquote>
<blockquote type="cite">
<div>
mkgmap loops in method AnyCharsetEncoder.encodeText(String text)
</div>
<div>
I guess the same can happen when labels are cut at length 170.
</div>
</blockquote>
<blockquote type="cite">
<div>
The attached patch seems to fix this, but I have no idea if this is
</div>
<div>
the right approach.
</div>
</blockquote>
<blockquote type="cite">
<div>
Gerd
</div>
</blockquote>
<blockquote type="cite">
<div>
________________________________________
</div>
<div>
Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag
</div>
<div>
von Ticker Berkin <<a href="mailto:rwb-mkgmap@jagit.co.uk">rwb-mkgmap@jagit.co.uk</a>>
</div>
<div>
Gesendet: Montag, 27. Dezember 2021 20:06
</div>
<div>
An: Development list for mkgmap
</div>
<div>
Betreff: Re: [mkgmap-dev] r4836 stops Hungary & Romania
</div>
</blockquote>
<blockquote type="cite">
<div>
Looks like uft16 surrogate pair chars are being separated by the
</div>
<div>
substr.
</div>
</blockquote>
<blockquote type="cite">
<div>
Ticker
</div>
</blockquote>
<div>
>
</div>
<div>
>
</div>
<blockquote type="cite">
<div>
On Mon, 2021-12-27 at 19:28 +0100, Arndt Röhrig wrote:
</div>
<blockquote type="cite">
<div>
...mayby is in the osm data a kryptic text like this:
</div>
</blockquote>
<blockquote type="cite">
<div>
<a href="https://www.openstreetmap.org/node/9115233473" rel="noopener" target="_blank">https://www.openstreetmap.org/node/9115233473</a>
</div>
</blockquote>
</blockquote>
<blockquote type="cite">
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
</blockquote>
<div>
<br>
</div>
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
<div>
_______________________________________________
</div>
<div>
mkgmap-dev mailing list
</div>
<div>
<a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a>
</div>
<div>
<a href="https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev" rel="noopener" target="_blank">https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a>
</div>
</blockquote>
</body>
</html>