OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (char)0 handling proposal



* Brendan Macmillan wrote:
>> >a convention for representing a character of value 0 in XML?
>> 
>> I suggest the hexBinary or base64Binary XML Schema Datatypes, they are
>> as "standard" as possible. Since the text node contains obviously binary
>> data, it's just the way to go.
>
>Thanks for your reply!  For pure binary data, I definitely agree.. but I'm
>thinking of strings like:
>
>"Now is the time for all good men to come to the aid of the party@@@@@@@@@"
>
>Where the "@" are null characters - where the String is *mostly* text, it
>would be nice to render the readable text as human readable...

Create a new simpleType quotedPrintable, then you can have

  "Now is the time for all good men to come to the aid of the
   party=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00"

where the string is converted to UTF-16LE before applying QP. This is as
human readble as possible. But please note that wouldn't be a very
interoperable solution and I discourage such multi-level encodings.

If it's binary don't use XML (directly) or use the mentioned types. Who
cares about human consumption _and_ uses binary data?
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/