Post subject: how to add add unicode support on an existing C++ library
Posted: Tue Jun 11, 2013 8:40 am
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?
Post subject: Re: how to add add unicode support on an existing C++ librar
Posted: Fri Nov 22, 2013 2:38 am
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....
Users browsing this forum: Yahoo [Bot] and 2 guests
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