www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1608] New: Exceptions don't work with UTF-8

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1608

           Summary: Exceptions don't work with UTF-8
           Product: D
           Version: 1.022
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: mk krej.cz


Exceptions don't print Unicode characters under Windows console using chcp
65001. Maybe it's related to:
http://d.puremagic.com/issues/show_bug.cgi?id=1448

import std.stdio;

void main()
{
        writefln("test_\u00E1_end");
        throw new Exception("test_\u00E1_end");
}

Output:
test_á_end    //correct
Error: test_  //cut-off


-- 
Oct 23 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1608


smjg iname.com changed:

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





It appears that issue 1448 was fixed for stdout but strangely not for stderr. 
But what happens on mine (DMD 1.022, Windows Vista) is different:

import std.stdio;

void main()
{
    writefln("writefln: test_\u00E1_end");
    fwritefln(stdout, "stdout:  test_\u00E1_end");
    fwritefln(stderr, "stderr:  test_\u00E1_end");
    throw new Exception("test_\u00E1_end");
}

writefln: test_á_end
stdout:  test_á_end
stderr:  test_��_end
Error: except:  test_��_end

(In the last two cases I get squares - they seem to display as question marks
in some fonts.)


-- 
Oct 29 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1608


mk krej.cz changed:

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







*** This bug has been marked as a duplicate of 1448 ***


-- 
Oct 29 2007