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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX/C++: First interface draft

[ Lists Home | Date Index | Thread Index ]
  • From: John Aldridge <john.aldridge@informatix.co.uk>
  • To: xml-dev@ic.ac.uk
  • Date: Mon, 06 Dec 1999 11:30:02 +0000

At 10:06 06/12/99 +0100, Steinar Bang <sb@metis.no> wrote:
>After thinking over the weekend, I'm changing my vote on this issue.
>I think the convenience of using basic_string<> way outweighs the
>cost advantages of lazy conversion,

Agreed.

>But the UTF-16 string should not be a straight typedef.  We should
>derive from basic_string<SAXChar> to get a char* constructor that
>would take a UTF-8-encoded string.  This is for ease of use with
>character constants.

I disagree with this, though.  It's not that much of a hardship to add an
"L" before your character constants; certainly not enough to warrant
subclassing a class without a virtual dtor (and duplicating all the
constructors and all the functions which return a string as a function
result).

I think I'd go for using straight std::wstring, and define the characters
in those wstrings to be UTF-16 encoded (whatever the current C locale
says).  Leave it up to the application either to set a locale in which
wchar_t is UTF-16 (in which case the RTL functions will behave sensibly),
or not (in which case the application will have to hand crank some things).
-- 
Cheers,
John

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS