Re: Want Input boxes to accept unicode strings on Standard Window
- From: "Mihai N." <nmihai_year_2000@xxxxxxxxx>
- Date: Thu, 26 Jul 2007 21:24:26 -0700
What does this mean exactly? My own parser, which seems to work fine for
my purposes (serialization), simply writes std::string to and from XML.
Why does it need to understand UTF-8?
Well, it was some kind of answer to your post complaining
that XML (as standard) "required these kinds of XML parsers"
and complained about size.
So my answer was that there is no need to be big, or to support
all the encodings in the world.
If your parser uses std::string, there is no problem.
Just make sure the std::string contains UTF-8, and you set the
encoding to UTF-8. And if you read an XML and the encoding
directive is not UTF-8, you fail. And you are compliant.
You can also read/write ANSI using std::string, as long as you
set the encoding to that ANSI code page, and you check it at
load time.
If you don't read UTf-16 and UTF-8 XML files, you parser is not
standard compliant, but you might not care, if you don't have
to interract with applications that are compliant.
But if your parser writes using ANSI on a Japanese system and
reads it as ANSI on a Russian one, ignoring the encoding directive,
then you have to care, because you corrupt your own data data.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
.
- References:
- Re: Want Input boxes to accept unicode strings on Standard Windows XP
- From: Tom Serface
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: David Ching
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: Tom Serface
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: David Ching
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: Mihai N.
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: David Ching
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: Mihai N.
- Re: Want Input boxes to accept unicode strings on Standard Window
- From: David Wilkinson
- Re: Want Input boxes to accept unicode strings on Standard Windows XP
- Prev by Date: Re: Want Input boxes to accept unicode strings on Standard Window
- Next by Date: Re: Want Input boxes to accept unicode strings on Standard Window
- Previous by thread: Re: Want Input boxes to accept unicode strings on Standard Window
- Next by thread: Re: Want Input boxes to accept unicode strings on Standard Window
- Index(es):
Relevant Pages
|