|
Boost : |
Subject: Re: [boost] Fw: [locale] Formal review of Boost.Locale library
From: Ryou Ezoe (boostcpp_at_[hidden])
Date: 2011-04-14 16:48:28
>Take a look on libs/locale/examples/wboundary.cpp.
It use L encoding prefix.
Of course MSVC use UTF-16 for L prefix.
In fact, you can save wboundary.cpp in any encoding that support
Japanese such as Shift-JIS, EUC-JP or JIS and UTFs encoding and it
still works.
MSVC automaticlly convert it for you.
string literal with no encoding prefix is still ASCII or other MBCS encoding.
On Fri, Apr 15, 2011 at 5:42 AM, Artyom <artyomtnk_at_[hidden]> wrote:
>>
>
>> Saving source file in UTF-8 with BOM doesn't make MSVC use UTF-8 as
>> char  encoding.
>> It's just because ASCII is compatible with UTF-8 encoding.
>> It's  still a Multibyte Character Set.
>> I use Windows with Japanese locale.
>> In my  environment, string literal with no encoding prefix become Shift-JIS.
>>
>> So  this library takes whatever encoding the compiler use for char and
>> use it as  unique identifier for a corresponding translated text.
>>
>> If you really want  to use UTF-8, then you have to use C++0x's u8
>> encoding prefix.
>> Not many  compiler support it yet though.
>>
>
> It actually does.
>
> Take a look on libs/locale/examples/wboundary.cpp.
> Add UTF-8 BOM to it, compile it with MSVC it works
> perfectly.
>
> There is no problems with that.
>
> I'm working usually in Hebrew locale so it
> does not "work" for me either. However Adding BOM
> solves problems.
>
>>
>> --
>> Ryou  Ezoe
>
> On the same note I'd like to address you
> to this table
>
>
> http://cppcms.sourceforge.net/boost_locale/html/appendix.html#tested_compilers_and_paltforms
>
>
> You'll see that MSVC 2008 and 2010 is fully
> supported with all icu, winapi and std backends.
>
> I've got reports that MSVC 2005 works fully as well.
>
> Artyom
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
-- Ryou Ezoe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk