D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4522 - Write outputs Unicode incorrectly (on Windows)
Summary: Write outputs Unicode incorrectly (on Windows)
Status: RESOLVED DUPLICATE of issue 2742
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-27 18:11 UTC by Andrej Mitrovic
Modified: 2010-07-28 10:42 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2010-07-27 18:11:25 UTC
import std.stdio;

void main() {
   string str = "Hall\u00E5, V\u00E4rld!";
   foreach (dchar c; str) {
       write('[', c, ']');
   }
   writeln();
}

Prints:
[H][a][l][l][å][,][ ][V][ä][r][l][d][!]

Instead of:
[H][a][l][l][å][,][ ][V][ä][r][l][d][!]
Comment 1 Stewart Gordon 2010-07-28 10:42:40 UTC

*** This issue has been marked as a duplicate of issue 2742 ***