473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to deal with Unicode

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?
--
Thanks
Barry
Sep 3 '07 #1
2 2129
Alf P. Steinbach wrote:
* 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.
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.
--
Thanks
Barry
Sep 3 '07 #2
On 2007-09-03 12:36, Barry wrote:
Alf P. Steinbach wrote:
>* 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.

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.

--
Erik Wikström
Sep 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Weir | last post by:
I'm sure this is a very simple thing to do, once you know how to do it, but I am having no fun at all trying to write utf-8 strings to a unicode file. Does anyone have a couple of lines of code...
8
by: Bill Eldridge | last post by:
I'm trying to grab a document off the Web and toss it into a MySQL database, but I keep running into the various encoding problems with Unicode (that aren't a problem for me with GB2312, BIG 5,...
8
by: Francis Girard | last post by:
Hi, For the first time in my programmer life, I have to take care of character encoding. I have a question about the BOM marks. If I understand well, into the UTF-8 unicode binary...
2
by: Neil Schemenauer | last post by:
python-dev@python.org.] The PEP has been rewritten based on a suggestion by Guido to change str() rather than adding a new built-in function. Based on my testing, I believe the idea is...
0
by: Edwin Knoppert | last post by:
I'm busy with an http request and response class. However, the calling app is in ANSI, so single bytes are sent. The receiver is an ASP.NET app. Due home-brewed encoding i can use the ASP.NET...
24
by: ChaosKCW | last post by:
Hi I am reading from an oracle database using cx_Oracle. I am writing to a SQLite database using apsw. The oracle database is returning utf-8 characters for euopean item names, ie special...
0
by: CtrlAltDel | last post by:
This isn't a PHP issue per say, but I guess a question to other PHP developers. I've just recently converted everything I got to Unicode UTF-8 which introduced me to the "problems" dealing with...
3
by: Jorgen Bodde | last post by:
Hi All, I am relatively new to python unicode pains and I would like to have some advice. I have this snippet of code: def playFile(cmd, args): argstr = list() for arg in...
0
by: Edwin.Madari | last post by:
if you can print out values of 'filemask', and 'thefile' variables, when it crashes, I can help. thx. Edwin -----Original Message----- From:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.