Re: [mkgmap-dev] Branch is_in ready for a first test

2020-01-14 Thread Gerd Petermann
Hi Jan, thanks for testing. Reg. the ways: Yes, that's an error. I'll have a look at it. Reg. your rules: I would add the clause & isin!=* in the 2nd rule to avoid a 2nd execution of the is_in function. Reg. ON: The current implementation of is_in accepts only 'all' or 'any'. I think we can

Re: [mkgmap-dev] Elevation data just partially accessable by Basecamp

2020-01-14 Thread Andrzej Popowski
Hi Gerd, for GMapTool to set first flag, all tiles should include DEM. I'm afraid, that mapset with mixed tiles - with and without DEM - is not standard for Garmin. It might be impossible to invent a proper way to handle that configuration. Some years ago I did a number of tests and chose

Re: [mkgmap-dev] TYP files and character encoding

2020-01-14 Thread Gerd Petermann
Hi Ticker, my understanding is that all are closed. Gerd Von: mkgmap-dev im Auftrag von Ticker Berkin Gesendet: Dienstag, 14. Januar 2020 11:28 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] TYP files and character encoding Hi Gerd I'll

Re: [mkgmap-dev] TYP files and character encoding

2020-01-14 Thread Ticker Berkin
Hi Gerd I'll attempt to get everything closed, either directly or with try () {} I couldn't work out from the documentation if parameter nested auto/closeable objects get closed, ie in: try (reader r = new BufferedReader( new InputStreamReader( new

Re: [mkgmap-dev] TYP files and character encoding

2020-01-14 Thread Gerd Petermann
Hi Ticker, yes, and every missing close() is a brain teaser ;) We have a few places where files are opened and closed in a different method. This is likely to cause trouble in unit tests, esp. on Windows. Whereever possible we should use try-with-ressources instead of Utils.closeFile() and add

Re: [mkgmap-dev] TYP files and character encoding

2020-01-14 Thread Ticker Berkin
Hi Gerd Here is updated patch that closes the file, although I find many files in mkgmap that don't have explicit close(), but I presume .finalize() will close them eventually. I'll do another patch for other text file handling, using StandardCharset where possible and fixing TokenScanner

Re: [mkgmap-dev] TYP files and character encoding

2020-01-14 Thread Gerd Petermann
Hi Ticker, thanks for the patch. Please review TypCompiler.CharsetProbe. BufferedReader br is not closed. Is that intended? I see that we have a mix of "utf-8" and "UTF-8" in the mkgmap sources. I think it would be good to use StandardCharsets.UTF_8 where possible and unify the rest. Gerd