|
Boost : |
Subject: Re: [boost] Fw: [locale] Formal review of Boost.Locale library
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-14 17:14:48
> > Because the sources are in UTF-8 ;-) and it is "Hello World" in Hebrew
> It can be UTF-16 as wel.
> It's just other encoding can't represents hebrew characters.
>
> > (with vowel marks)
> >
> > :-)
> >
> > The best is just to use UTF-8 (source code) anywhere - MSVC handles it
> > just fine...
> I agree with that part.
>
> But the point is string literal with no encoding prefix is evil.
> if i write
>
> char s[] = "ããããã" ;
>
> MSVC use shift-jis encoding.
>
> Japanese will sure to write something like translate("æ¥æ¬èª").
>
The point is that in the source you should write:
MessageBoxW(wgettext("Language").c_str(),wgettext("Japanese
language").c_str(),MB_OK)
// (ASCII source)
And it would be translated by the dictionaries to
MessageBoxW(L"è¨èª",L"æ¥æ¬èª",MB_OK); // In real calls, not the source code
The point if you use Japanese - inline then you don't need to translate
strings, and if you do translate then write source code with ASCII strings
that would work with any encoding and would be understandable for any software)
This is how all translation systems I know work.
Having original text strings in Japanese and translating
them to French or Hebrew is very-very-bad idea as it
is much simpler to find somebody to be able to translate
the text from English to Hebrew then from Japanese to Hebrew.
English and ASCII is the "source code" of the final text,
it is "Anglo-Centric" but so the software development world.
Artyom
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk