473,657 Members | 2,654 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to deal with Unicode

Hi group,

As I found out
Boost has utf8_codecvt_fa cet

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 2143
Alf P. Steinbach wrote:
* Barry:
>Hi group,

As I found out
Boost has utf8_codecvt_fa cet

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_fa cet

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
17613
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 that - opens a file appropriately for output - writes to this file Thanks very much. Michael Weir
8
5264
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, etc.) What I'd like is something as simple as: CREATE TABLE junk (junklet VARCHAR(2500) CHARACTER SET UTF8)); import MySQLdb, re,urllib
8
3648
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 representation, some systems add at the beginning of the file a BOM mark (Windows?), some don't. (Linux?). Therefore, the exact same text encoded in the same UTF-8 will result in two different binary files, and of a slightly different length. Right ?
2
2618
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 feasible. It would be helpful if people could test the patched Python with their own applications and report any incompatibilities. PEP: 349
0
1001
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 string and will have the same contents as the calling app. What wonders me is that Mid( a$, 1, 1 ) in asp.net is still unicode. We have a single character.. what are the possiblities this single character can have? It still looks a 256 bit...
24
9043
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 charcaters from an ASCII perspective. I get the following error: > SQLiteCur.execute(sql, row)
0
1166
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 characters in the 128-159 range. Typically my users will copy and paste from Microsoft Word into my web forms which introduces characters like the m-dash. Obviously I don't want my webpage to show a bunch of ?'s and squares so I have to deal with...
3
6628
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 appcfg.options.split(): thefile = args filemask = u"%file%"
0
263
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: python-list-bounces+edwin.madari=verizonwireless.com@python.org On Behalf Of Jorgen Bodde Sent: Monday, August 04, 2008 2:24 PM To: python-list@python.org
0
8306
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7327
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.