From: "Ben Griffin" <[email protected]>
We use many literal XMLCh* string declarations in our codebase.
I am still not sure what is the safest, but most efficient way of
declaring these WITHOUT RELYING UPON A TRANSCODE.
...
I must admit that for strings containing only the usual (strict) ASCII
character set, I have just been doing
const XMLCh *szDataString = L"The string";
It works fine. I should add that I'm using Microsoft Visual Studio 2008,
and have no intention of porting to any non Windows platform (or pre XP
platform). All my text is UTF-16.
I should also say that I'm currently parsing well-defined XML files where
node names etc are all composed of a-z, 0-9 and hyphen. But at some point
I am going to have to consider saving text entries in XML files which, in
the originating software, can arbitrary UTF-16 text, and at that point I
suppose I may have to worry about this sort of thing. For a start, I'd
like to have a firmer idea of what "transcode" actually does?
Dave
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm