I got "WString::widen(): could not widen string: a.精明的,敏锐的,机灵的"?
Added by ivan jobs over 14 years ago
Hi buddies,
I want to show Chinese characters with WText, but I got this error and something like "?" on my screen.
What should I do? Thanks :).
Replies (4)
RE: I got "WString::widen(): could not widen string: a.精明的,敏锐的,机灵的"? - Added by Koen Deforche over 14 years ago
Hey Ivan,
It depends on how you are representing this Chinese text in the first place.
If you have it as UTF8, then you should use WString::fromUTF8().
If it is a constant, then the easiest solution is to put it in a resource file.
Regards,
koen
RE: I got "WString::widen(): could not widen string: a.精明的,敏锐的,机灵的"? - Added by ivan jobs over 14 years ago
Hi Koen,
Pretty appreciate your quick reply. I found how to solve this problem. I need to convert string to WString. I solved this problem by using tr() function.
Thanks any way.
RE: I got "WString::widen(): could not widen string: a.精明的,敏锐的,机灵的"? - Added by ivan jobs over 14 years ago
Hi Koen,
I store my Chinese text in a SQLite3 database and get the text using Wt::Dbo APIs. In your opinion, what should I do in this condition? Thanks for your reply.
RE: I got "WString::widen(): could not widen string: a.精明的,敏锐的,机灵的"? - Added by ivan jobs over 14 years ago
Hi Koen,
With function tr(), I don't really solved my problem. "??" become fewer but still exist.
But with WString::fromUTF8(), I really solved this problem. Thanks any way.