[josm-dev] control characters in config file
Frederik Ramm
frederik at remote.org
Wed Dec 29 12:44:56 GMT 2010
Hi,
On 12/29/10 13:25, Dirk Stöcker wrote:
> Yes. I used 0x1E (and yes, I know my standards), as semicolon had lots
> of troubles, same with comma and everthing else. E.G. the commit
> comments use all of these characters. Previously it has been ';' as well
> as ',' and some forms of §.
Why did you not go with a semicolon and escape it when it occurred
elsewhere? Given that 0x1E is a valid character that might conceivably
appear inside a value, you must have some sort of escaping rule anyway -
why not apply the same escaping rule but use a semicolon.
> The advanced preferences allow to enter fields as well. Generally
> directly editing the josm config-file is not a recommendable thing
> anyway
I do it all the time.
> BTW: Sending 0x1E by mail is usually no problem - it is a ASCII
> character (and thus also a valid UTF-8 character).
Surely you are joking. It may be possible to send it but even if it
isn't mangled by a non-standards-compliant user agent, it would be
killed in copy-and-paste. Plus I'd have to add a paragraph to my email
about how to enter that character with your keyboard in your preferred
editor in case they wanted to do so by hand.
> I really did think a lot about what record separation we should use and
> the 0x1E is the best we can reach without going to a XML format
I disagree. I think that a semicolon is better than 0x1e.
> And it took a long time
> to get rid of old config handling as well and replace it by a standard
> interface.
I'm not saying your work should be undone - I'm ok with the config
handling, just not with the 0x1e.
> There is already a ticket about a way to change config using a
> specification file (like e.g. .reg files do for windows registry).
> Implementing this would solve your problem in the right way.
My problem is that there are unnecessary control characters in what
would otherwise be a nice plain text file.
Bye
Frederik
More information about the josm-dev
mailing list