J
jiang lei
Sorry if someone ever posted this question before.
I was wondering if there is a generic solution to string processing, if not
on all, at least on most of the platforms. std::string could've been good if
it can cope with unicode characters. On Linux Redhat 8.0, even
basic_string<wchar_t> will not compile because basic_string::c_str() looks
something like this:
if(nodata)
return "";
else
return data();
The hard-coded zero length string never agrees with a w_char* return type.
The only other thing I can come up with is ICU. It has a unicode string
class and can play all the code page conversion tricks. However, the cost is
much too high because it comes with a 10MB runtime..
Any ideas?
I was wondering if there is a generic solution to string processing, if not
on all, at least on most of the platforms. std::string could've been good if
it can cope with unicode characters. On Linux Redhat 8.0, even
basic_string<wchar_t> will not compile because basic_string::c_str() looks
something like this:
if(nodata)
return "";
else
return data();
The hard-coded zero length string never agrees with a w_char* return type.
The only other thing I can come up with is ICU. It has a unicode string
class and can play all the code page conversion tricks. However, the cost is
much too high because it comes with a 10MB runtime..
Any ideas?