Russian and other national languages support
Max Samukha
samukha at voliacable.com.removethis
Tue Feb 3 09:38:05 PST 2009
On Tue, 3 Feb 2009 17:13:38 +0000 (UTC), zorran <zorran at tut.by> wrote:
>Russian language not working
>in comments and strings by default
>with ANSI coding (code page)
>
>Compiler write error - "invalid UTF-8 sequence"
>
>==============
>void main()
>{
> string s = "Что-то по русски"; // some text in russian
> printf("hello, world!"); // Здравствуй, мир!
>}
>==============
>
>(D version 1.039)
>
>in Delphi, C#, and many C++ compilers - All OK!
>Why?
>it can reduce popularity D!
>Russian text not needs two-byte code-page! its not Chinese!
D strings are supposed to be UTF-8. Source files can be ASCII or UTF.
To escape a Unicode code point, use \u0000 or \U00000000, where 0 is a
hexadecimal digit. Be aware that dmd/phobos still have some minor
problems with Unicode support. For example, messages produced by
static asserts are not output correctly.
More information about the Digitalmars-d-bugs
mailing list