Re: C++ string and UTF8
Re: C++ string and UTF8
- Subject: Re: C++ string and UTF8
- From: Alexander Dymerets <email@hidden>
- Date: Thu, 07 Apr 2005 16:56:25 +0300
- Organization: The Product Engine (Odessa)
Julien Palmas wrote:
And what if the c++ string contains Unicode (UTF-16), and not UTF-8 ?
This time it looks like I can't use c_str() ...
std::string can't contain UTF-16 characters. You can do something like this:
typedef std::basic_string<unichar> unistring;
unistring ustr;
//..........
NSString *cocoa_str = [NSString stringWithCharacters: ustr.c_str()
length: ustr.length()];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden