Boost logo

Boost :

Subject: Re: [boost] [locale] Formal review of Boost.Locale library EXTENDED
From: Ryou Ezoe (boostcpp_at_[hidden])
Date: 2011-04-19 09:53:44


What I want is translate() accept wchar_t const * and std::wstring as
a parameter. just like it accept char const * and std::string.
Then, it return the corresponding translated text.
Although the encoding of wchar_t is unspecified in the Standard.
In the current MS-Windows environment, it should be treated as UTF-16.

Converting it to UTF-8 is a implementation details.
I don't care which UTF it internally use.
As long as it support real UCS(all code points defined in UCS)

But treating it as UCS rather than binary string is better.

Assuming we have C++0x compiler and encoding of wchar_t is UTF-16,
translate(u8"text"), translate(u"text"), translate(U"text") and
translate(L"text")
all returns the same mapped translated text according to the locale.
This is a good.

On Tue, Apr 19, 2011 at 10:38 PM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Ryou Ezoe wrote:
>>
>> I don't care library internally convert between UTFs.
>> At least, conversion between UTFs are trivial and more importantly
>> consistent so I don't care.
>>
>> The user want to develop their software using their native language.
>> Localization should be done by mapping their language to other languages.
>> So the library should offer mapping to any unicode string to other
>> unicode string.
>
> But you have to propose something specific. How should the library be
> changed? I asked a direct question: if the library accepts
>
>   translate( L"日本語" )
>
> encodes the wide literal as UTF-8 and uses it to look up a msgid in the .po
> file, will this be enough for you? Or do you want something else, and if so,
> what?
> _______________________________________________
> 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