On Tuesday 07 March 2006 15:56, Scott Cantor wrote:

> I think by not trying to wrap them. It just doesn't pay to transcode
> everything because you *might* need to. I stick with XMLCh* until I need
> 8-bit strings and then I wrap them in a simple auto_ptr clone that does a
> release() instead of a delete.

For what I am currently planning, I will either have to use the XMLCh outside 
of Xerces, or convert.  Performance is not an immediate concern.

> In the long run, it just works out to be less work than trying to wrap the
> entire DOM, and much more efficient.
>
> Note that at this time, most compilers again support basic_string<XMLCh> so
> you can do string-class stuff without transcoding.

I believe, if I try hard enough, I can get C++ to convert from one encoding to 
another using features from <locale>, but I'm not sure.  I'm guessing it 
would be overly optimistic to expect the assignment operator in 
std::basic_string<> to provide that conversion.


> The worst part of this is not having string literals, I freely admit.

w_char doesn't work, eh?  

I have to wonder what a person would do if - may the High Ones forbid it - 
they actually wanted to use the DOM to model a document in, say, a word 
processor.

STH 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to