[josm-dev] control characters in config file
Dirk Stöcker
openstreetmap at dstoecker.de
Wed Dec 29 15:31:26 GMT 2010
On Wed, 29 Dec 2010, Frederik Ramm wrote:
>> I don't know how to enter it by hand. I always used copy&paste :-)
>
> When I use the standard way of copy+paste under X - mouse select, then middle
> mouse button, no key presses - this results in a double ^ and not the desired
> 0x1e. In fact even fumbling with Ctrl-C and Ctrl-V does nothing for me
> (typical application: "grep something .josm/preferences" in one window, with
> an editor open in another window ready to add whatever line the grep finds).
Copying from a shell does not work here as well, but same procedure using
kate works. So I assume it is an issue with the interface of X11 to
shells. You should use the editor internal copy functions thus :-)
> You are right in that this procedure is likely to break other utf-8
> characters as well. Strangely, in *my* .josm/preferences, the only character
> that breaks is the record separator.
Well, UTF-8 usually survives when handles as ISO-8859-X, but not always.
>> Well, we had lot of troubles with comma and semicolon, but till now
>> there was no trouble with the 0x1E, so I assume you are wrong here.
>
> Well if you really didn't have any escaping then of course one would have
> more problems with characters that occur more often. But now that the config
> handling is nicely encapsulated, it should be easy to handle escaping
> properly, so any character can be used as a "record separator".
What you call nicely encapsulated is still neither fully implemented, nor
100% save. For example the internal storage should work completely without
a separation character. And changing the character again will take another
half year or more.
Instead of changing the current separator or the escaping rules I
would prefer a useful XML-format. This is one of the last places, where we
don't use proper XML.
Ciao
--
http://www.dstoecker.eu/ (PGP key available)
More information about the josm-dev
mailing list