Bug: Commit message containing control characters

Derrick Hudson dman13 at gmail.com
Sat Sep 3 01:33:54 BST 2005


On 9/1/05, Harald Meland <harald.meland at usit.uio.no> wrote:
> [Robert Collins]
> 
> >> The root of the problem is that the XML 1.0 specification doesn't seem
> >> to allow encoding of such "control characters" as e.g. "\x01", if I
> >> understand the the well-formedness constraint here correctly:
> >>
> >>   http://www.w3.org/TR/REC-xml/#NT-Char
> >
> > &#x1; should work.
> 
> I don't think so; the XML 1.0 specification's section "Character and
> Entity References" (http://www.w3.org/TR/REC-xml/#sec-references)
> says:

This is my reading of the spec too -- ASCII control characters (except
tab, line feed and carriage return) can not be represented natively in
XML.  One could encode the data as base64 or whatever and put that in
the XML.  I ran into this problem before when trying to update from an
obsolete XML parser that wasn't standards compliant to one that
enforces the spec.

-D




More information about the bazaar mailing list