The Unicode Consortium Discussion Forum

The Unicode Consortium Discussion Forum

 Forum Home  Unicode Home Page Code Charts Technical Reports FAQ Pages 
 
It is currently Wed Oct 22, 2014 6:12 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: how to add add unicode support on an existing C++ library
PostPosted: Tue Jun 11, 2013 8:40 am 
Offline

Joined: Mon Jun 10, 2013 11:12 am
Posts: 3
I was recently tasked to add unicode support for a C++ toolkit, a C++ library that is able to run on different platforms
1. In the existing C++ library, the string class can handle both char and wchar_t, string and wstring ( The implementation using Template )
2. As I mentioned before, the C++ library is capable of of running on a variety of different platforms such as Windows. Linux, Unix ( AIX, Solaris, HP etc)
3. after some google search. Right now I am leaning towards using uft-8 encoding for the C++ library.

My question here: Any suggestions on what approach I shall take?


Top
 Profile  
 
 Post subject: Re: how to add add unicode support on an existing C++ librar
PostPosted: Fri Nov 22, 2013 2:38 am 
Offline
Unicode Guru

Joined: Tue Dec 01, 2009 2:49 pm
Posts: 189
Technically, the wchar_t should be set to the widest code unit, so char as byte and string as utf-8 would work, and then wchar_t would be UTF32.

However, many implementation find it practical to use UTF16 in wchar_t with the downside that surrogate pairs aren't automatically handled, but surfaced to the user of the library. The upside is that on many plaforms, UTF-16 is the native format....


Top
 Profile  
 
 Post subject: Re: how to add add unicode support on an existing C++ librar
PostPosted: Tue Jul 01, 2014 11:13 am 
Offline

Joined: Sat Jun 28, 2014 10:42 am
Posts: 1
I've been looking to do something similar to you kathyqe. Thanks for the info on this asmus. I think it'll be UTF-16 for me.
_________________________
Google Sniper


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


Quick-mod tools:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Template made by DEVPPL.com