On Tue, 3 Feb 2009 17:13:38 +0000 (UTC), zorran <zor...@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 = "&#1063;&#1090;&#1086;-&#1090;&#1086; &#1087;&#1086; 
> &#1088;&#1091;&#1089;&#1089;&#1082;&#1080;"; // some text in russian
>       printf("hello, world!"); // 
> &#1047;&#1076;&#1088;&#1072;&#1074;&#1089;&#1090;&#1074;&#1091;&#1081;, 
> &#1084;&#1080;&#1088;!
>}
>==============
>
>(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. 

Reply via email to