How to deal with Unicode

B

Barry

Hi group,

As I found out
Boost has utf8_codecvt_facet

So is there any library completely support for all UTF in this way

or any other way to deal with Unicode more elegantly?

How ICU supports C++ io stream?
 
A

Alf P. Steinbach

* Barry:
Hi group,

As I found out
Boost has utf8_codecvt_facet

Super. I didn't know that.

So is there any library completely support for all UTF in this way

The Dinkumware implementation of the standard library reportedly has
fairly complete support for Unicode.

or any other way to deal with Unicode more elegantly?

Depends how much of Unicode functionality you need. E.g., UCS2 is easy.

Cheers, & hth.,

- Alf
 
B

Barry

Alf said:
* Barry:

Super. I didn't know that.



The Dinkumware implementation of the standard library reportedly has
fairly complete support for Unicode.



Depends how much of Unicode functionality you need. E.g., UCS2 is easy.

well, I'm student
so language selection is not critical for me,
When come to Unicode issue, I choose Java or C#, I really appreciate
their native support for Unicode. Together with string and IO.

I just downloaded ICU yesterday.
with a quick view, I did't see how ICU works with C++ io streams using
codecvt.
If fully Unicode support needs different String and IO implementation.
that's really painful. Then we have to modify a lot of code to bridge
std::xstring and std::ioxxx with the new String and IO supporting Unicode.
 
?

=?ISO-8859-1?Q?Erik_Wikstr=F6m?=

well, I'm student
so language selection is not critical for me,
When come to Unicode issue, I choose Java or C#, I really appreciate
their native support for Unicode. Together with string and IO.

I just downloaded ICU yesterday.
with a quick view, I did't see how ICU works with C++ io streams using
codecvt.
If fully Unicode support needs different String and IO implementation.
that's really painful. Then we have to modify a lot of code to bridge
std::xstring and std::ioxxx with the new String and IO supporting Unicode.

There are two ways (that I know of, I have not made much use of Unicode)
to handle Unicode in C++, either use the wide verions (wstring, wcout,
etc.) for UTF-16 or UTF32 (depends on the platform) or use the normal
strings ect. for UTF-8. If you use normal strings just remember that
size() does not represent the number of characters (or whatever it's
called) but rather the number of bytes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top