Re: [libxml++] UTF8 support
- From: Stefan Seefeld <seefeld sympatico ca>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] UTF8 support
- Date: Tue, 25 Feb 2003 01:59:45 -0500
Ole Laursen wrote:
Please don't abuse std::string in such a horrible way.
You are exaggerating, really.
Remember that many string algorithms can be used without any trouble
if the std::string contains UTF-8. Copying, concatenation and even
replacement (of ASCII characters) all work.
No, replacement will *not* work, precisely because there is no simple
mapping of 'character' to 'byte'.
That covers 95%-100% of
the cases for typical GUI usage, I think.
I don't know how you come up with these numbers, and what you mean
by 'typical'. As soon as you get into non-ascii regions you'll be
in deep trouble.
You are ignoring my argument: the std::string API is completely
inappropriate to deal with the utf8 encoding. All but data() and
length() will cause undefined behavior.
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]