L in front of a string makes it a wide string
char *string = L"blah"; // compile error
wchar_t *string = L"blah"; // ok!

A wide string uses multiple bytes per character in order to be able to
represent international characters.

Regards,
Wim.

2010/2/23  <[email protected]>:
>
> Great! The long WString works for me now. But I never seen this
> kind of C++ style constructor like: WString(L"some string..."),
> big L ahead of string, it belongs to the standard of C++ ? And
> how I can define this kind of constructor?
>
> """
> This is what I wrote a couple of days ago on this list (You can
> probably replace WString by WText):
>
> """
> Quick fix 1: try WString(L"Frankfürt") (and make sure your compiler
> speaks your .cpp file's locale)
> Quick fix 2: try WString(tr("Frankfurt")) and put Frankfurt in a message
> bundle
>
> The correct response involves locale of files and compilers, combined
> with how the standard specifies it should be done. TreeViewDragDrop.C
> is saved in UTF-8 (but the file doesn't start with the UTF-8 cookie),
> which apparently causes the compiler to store the UTF-8 encoded string
> in the const char * sequence.
>
> Quick fix 2 will work for sure across all platforms and compilers.
> """
>
> Best regards,
> Wim.
>
> 2010/2/23  <[email protected]>:
>>
>> hi, Zhimin:
>>
>> doesn't work, unreadable code show me again.
>>
>> Regards
>> Jiongliang
>>
>> hi, Nianzhong:
>> You can try
>>> root()->addWidget(new WText(WString("Chinese words in here....")));
>> Regards
>> Zhimin
>>
>> 2010/2/23  <[email protected]>
>>
>> I have this code, but can't show chinese words in the browser web page.
>>
>>> root()->addWidget(new WText("Chinese words in here...."));
>>
>> got unreadable code in the browser web page.
>>
>> how to resolve this problem, maybe using <link> tag can do, but I don't
>> know how.
>>
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to