[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: MSXML DOM Special Chars Less Than 32


xquery msxml
On Sat, 2002-03-23 at 12:17, Tim Bray wrote:
> Amelia A Lewis wrote:
> 
> > In short, the C0 characters have no universal interpretation;
> > interpretation depends upon the application.  It seems reasonable, then,
> > that the application can encode the bloody things too.  Can't use XML
> > mechanisms.  Base64, the usual suggestion, incurs an immense overhead.
> 
> 
> I agree with the leading sentences.  As for the last, Base64 encodes
> 3 bytes as 4, thus incurring exactly 33% overhead.  Whether that
> is considered "immense" depends on your application scenario. -Tim

A little more than that, actually, in a correct base64 implementation.

Each 57 bytes become 76 bytes.  Add two more for CRLF.  Plus the final
padding, which is generally but not always negligible.  Lessee ... I'd
do the math, but I'm not working today, so it's lazy time: original +
1/3 + 1/57.  For decoding, 1 + 1 + 1/3 + 1/57, most likely, as you
prolly can't discard as you decode.

If "immense" is overwrought, could we agree on "significant"?  Tricks
like quoted-printable and encoded-word (and XML unicode numeric
entities) are attractive largely because the characters they encode are
*rarely* encountered, meaning that the cost is significantly less than
base64.

Amy!
(who's spent the last two weeks writing MIME-related code, and is
probably being hideously pedantic)
-- 
Amelia A. Lewis       amyzing@t...      alicorn@m...
Yankees are compelled by some mysterious force to imitate Southern 
accents and they're so damn dumb they don't know the difference beween
a Tennessee drawl and a Charleston clip.
                -- Rita Mae Brown, "Rubyfruit Jungle"

This is a digitally signed message part


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.