Jump to page: 1 2 3
Thread overview
[Issue 3193] New: Wrong processing by DMD.exe of Russian Windows-1251 character set: "invalid UTF-8 sequence"
Jul 20, 2009
ok96@mail.ru
Jul 20, 2009
Oleg Halzov
Jul 20, 2009
Matti Niemenmaa
Jul 21, 2009
Oleg Halzov
[Issue 3193] Support Windows-1251 as a source encoding
Jul 21, 2009
Stewart Gordon
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Stewart Gordon
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Walter Bright
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Oleg Halzov
Jul 22, 2009
Stewart Gordon
Jul 27, 2009
Sobirari Muhomori
Jul 27, 2009
Stewart Gordon
Jul 28, 2009
Sobirari Muhomori
Jul 28, 2009
Stewart Gordon
July 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193

           Summary: Wrong processing by DMD.exe of Russian Windows-1251
                    character set: "invalid UTF-8 sequence"
           Product: D
           Version: unspecified
          Platform: x86
               URL: http://picasaweb.google.ru/ohalzov/DBugs#
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic, wrong-code
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: ok96@mail.ru


If you compile hello.d example with Russian Win1251 charecters in this line:
 printf("Привет, D!\n");
dmd.exe reports an error:
D:\Apps\Prog_D\dmd\samples\d>dmd hello.d
hello.d(5): invalid UTF-8 sequence
hello.d(5): invalid UTF-8 sequence
hello.d(5): invalid UTF-8 sequence
hello.d(5): invalid UTF-8 sequence
hello.d(5): invalid UTF-8 sequence
hello.d(5): invalid UTF-8 sequence
If you save hello.d in UTF-8, then anyway dmd.exe compiles it wrong (see http
link).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193


Jarrett Billingsley <jarrett.billingsley@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jarrett.billingsley@gmail.c
                   |                            |om




--- Comment #1 from Jarrett Billingsley <jarrett.billingsley@gmail.com>  2009-07-20 06:09:18 PDT ---
The compiler does not understand Windows-1251, so this is according to spec.

However, you say the compiler compiles it wrong if it's in UTF-8; where's the link?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193





--- Comment #2 from Oleg Halzov <ok96@mail.ru>  2009-07-20 06:13:25 PDT ---
Created an attachment (id=428)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=428)
This screenshot is from Chris Miller

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193





--- Comment #3 from Jarrett Billingsley <jarrett.billingsley@gmail.com>  2009-07-20 07:52:38 PDT ---
Sorry, this is invalid.  To solve this, you have to do the following:

1) Set cmd.exe's font to Lucida Console.
2) Execute 'chcp 65001'.

Then run your program.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193





--- Comment #4 from Jarrett Billingsley <jarrett.billingsley@gmail.com>  2009-07-20 07:53:22 PDT ---
Created an attachment (id=429)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=429)
Correct Russian output

Here's an image that shows it working properly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193


Matti Niemenmaa <matti.niemenmaa+dbugzilla@iki.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 21, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193


Oleg Halzov <ok96@mail.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




--- Comment #5 from Oleg Halzov <ok96@mail.ru>  2009-07-20 22:28:13 PDT ---
But Jarrett, almost everybody who codes in Russian needs Windows-1251 codepage
by default. If we need to compile small program and we don't have robist IDE we
use notapad.exe (or something like this) that saves  Russian text in
Windows-1251.
And nobody will be changing his dafault font in "Command Prompt" to Lucida
Console only for my small program - I swear you!
Any other compilers (Pascal, C, C++) understand that the Russian text in
Windows is in Windows-1251! Currently I dont have any good editor for D whare I
can normally edit Russian texts in UTF-8. Entice Designer has a bug confirmed
by Chris Miller - you cannot enter Russian text, only copy and paste.
Therefore if you build a D compiler for Win32 platform, you have make it work
with widely used regional codepages.  Because the entire world is not English
only and fully not UTF-8!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 21, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193


Jarrett Billingsley <jarrett.billingsley@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|diagnostic, wrong-code      |
            Summary|Wrong processing by DMD.exe |Support Windows-1251 as a
                   |of Russian Windows-1251     |source encoding
                   |character set: "invalid     |
                   |UTF-8 sequence"             |
           Severity|critical                    |enhancement




--- Comment #6 from Jarrett Billingsley <jarrett.billingsley@gmail.com>  2009-07-20 23:11:34 PDT ---
What you're basically asking for is an enhancement.  I'm sorry, but that's the way it works.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 21, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193


Stewart Gordon <smjg@iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg@iname.com




--- Comment #7 from Stewart Gordon <smjg@iname.com>  2009-07-21 14:43:27 PDT ---
Why not make this enhancement request "Write a decent, free, Unicode-compatible code editor that syntax-highlights D properly"?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 22, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3193





--- Comment #8 from Jarrett Billingsley <jarrett.billingsley@gmail.com>  2009-07-21 17:07:58 PDT ---
(In reply to comment #7)
> Why not make this enhancement request "Write a decent, free, Unicode-compatible code editor that syntax-highlights D properly"?

Why not be a sarcastic ass _all the time_?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
« First   ‹ Prev
1 2 3