Bug: Commit message containing control characters

Harald Meland harald.meland at usit.uio.no
Mon Sep 5 01:17:31 BST 2005


[Jan Hudec]

> On Sun, Sep 04, 2005 at 17:52:05 -0400, Aaron Bentley wrote:
>> The problem is that an XML 1.0 document containing that character is not
>> well-formed.  Writers are not supposed to produce ill-formed documents,
>> and parsers are not required to decode them.
>
> Am I saying anything different? But the context before was about not being
> able to represent \x01 in XML -- which is possible using .

No, it's not -- if you by XML mean "well-formed XML" (which is the
least strict, and hence most common, constraint one can put on a
document while still calling it "XML").

The XML fragment "<foo>\x01</foo>" is just as non-well-formed as
"<foo>&#1;</foo>" is (at least that's how I read the XML spec).


I do agree, though, that ElementTree shouldn't silently produce
non-well-formed output that it is unable to parse.


If you're advocating that bzr should, on purpose, both produce and
require parsing of non-well-formed XML... then I'm not sure I see any
purpose to using XML in bzr at all; it'd be better off using a
home-made format (which easily could cater for all manner of control
characters).
-- 
Harald




More information about the bazaar mailing list