2010/4/3 Zhimin Song <[email protected]>:
> hi, Wim
>
> 2010/4/3 Wim Dumon <[email protected]>
>>
>> If I'm not mistaken, calling 'std::locale::global(std::locale(""))' at
>> the start of your program, e.g. in main(), will re-establish the old
>> behaviour. If you know what locale to put within the quotes, that's
>> even better.
>
> thanks for your hint, but the code :
>
> int main(int argc, char **argv) {
>   std::locale::global(std::locale(""));
>   // or std::locale::global(std::locale("zh-cn"));
>   return WRun(argc, argv, &createApplication);
> }
>
> does not work.
>
>>
>> How were you writing  your international characters till now? As
>> L"foo" or just "foo"?
>
> My situation is this:  all versions of my application till now are all based
> on the verison of wt-3.0.0 or the before one, in this situation, for example
>
>  "和" or L"和"   // 和 means harmony
>
> always works.Today I update wt to wt-3.1.2, then the "和" doesn't work, but
> L"和" is still ok, and the valgrind said "Error reading XHTML string: Invalid
> UTF-8 sequence", I think this is new feature from wt-3.1.1 (Possible UTF-8
> vulnerability).

Remember that C++ is not a UTF-8 language, although many compilers
support it as input, it *cannot* be guaranteed to work, that is
exactly why things like Boost.Locale are going through the review
queue soon.  Anytime you wish to print a UTF-8 character above 127,
you should read it in from an external location.

------------------------------------------------------------------------------
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