[Issue 1448] UTF-8 output to console is seriously broken

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 19 18:21:20 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=1448


Martin Krejcirik <mk at krej.cz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.020                       |D1 & D2


--- Comment #8 from Martin Krejcirik <mk at krej.cz> 2013-03-19 18:21:18 PDT ---
Status update as of DMD 2.062 (Win XP 32 bit)

Still the same error for the above mentioned example, however, when modified to
use write instead of fputs:

import std.stdio;
import std.c.windows.windows;

extern(Windows) BOOL SetConsoleOutputCP( UINT );

void main() {
    SetConsoleOutputCP( 65001 ); // or use "chcp 65001" instead
    stderr.write("STDERR:Output utf-8 accented char \u00e9\n... and the rest is
cut off!\n");
    stderr.write("end_STDERR.\n");
}

I get this error:

STDERR:Output utf-8 accented char é
... and the rest is cut off!
std.exception.ErrnoException at D:\PROGRAMS\DMD2\WINDOWS\BIN\..\..\src\phobos\std\stdio.d(1264):
 (No error)
----------------
0x0040D874
0x0040D6FF
0x00402218
0x00402189
0x00402121
0x00402030
0x0040354E
0x00403151
0x00402388
0x7C81776F in RegisterWaitForInputIdle
----------------

So if anybody have a clue what's going on there...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list