[Issue 7084] New: Missing writeln Unicode normalization
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 9 01:13:01 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7084
Summary: Missing writeln Unicode normalization
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-12-09 01:12:59 PST ---
In this program the string 'txt1' contains two codepoints: LATIN CAPITAL LETTER
A, and COMBINING DIAERESIS.
I think a good printing function has to perform Unicode normalization and show
a single \U000000C4 (LATIN CAPITAL LETTER A WITH DIAERESIS) glyph. But with DMD
2.057beta it shows two glyphs (on Windows), an 'A' followed by a diaeresis.
writeln(txt2) shows what I think is the correct output for writeln(txt1) too:
import std.stdio;
void main() {
dstring txt1 = "\U00000041\U00000308"d;
writeln(txt1);
dstring txt2 = "\U000000C4"d;
writeln(txt2);
}
--
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