Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Best Unicode strategy
Best Unicode strategy [message #34325] Sat, 12 November 2011 09:34 Go to previous message
conrad is currently offline  conrad
Messages: 12
Registered: November 2011
Location: Norway
Promising Member
Case:
Database access via a managed c++ wrapper package to .Net assemblies. In the .Net universe Strings are utf16.

As I understand it, U++ is by default "unicode aware" by virtue of its widgets understanding utf8.
A simple test revealed that I can feed a mixed English & Chinese char* to PromptOK like:

PromptOK( "Chinese (汉语/漢語, Pinyin: Hànyǔ; 华语/華語, Huáyǔ; or 中文, Zhōngwén)" );

Since most U++ text widgets take in String (not WString) I need to
make a decision as to what to transport.

As I see it there are 2 options:
1. Use String and pay the cost for many needed string manipulations since String itself is not really utf8 aware. I.o.w. many temp conversions to WString and back.
2. Use WString and convert to a String (utf8 somehow - not with ToString() since that uses a character set) before passing on to U++ widgets/drawing routines.

I'd like to hear what strategy other user of U++ have used?
I wonder if I have missed out on something or not dug deep enough.

Conrad
 
Read Message
Read Message
Read Message
Previous Topic: How to connect to native MySql
Next Topic: New and GUI Problem with TabCtrl
Goto Forum:
  


Current Time: Thu May 23 14:36:53 CEST 2024

Total time taken to generate the page: 0.02204 seconds