Bug 16005 – std.uni.toUpper returns wrong value for U+1FE2

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-05-09T18:43:00Z
Last change time
2016-05-09T19:54:54Z
Assigned to
nobody
Creator
jack

Comments

Comment #0 by jack — 2016-05-09T18:43:23Z
'\u1FE2'.toUpper returns U+1FE2 instead of the correct answer U+03A5
Comment #1 by ag0aep6g — 2016-05-09T19:51:25Z
An excerpt from <http://unicode.org/Public/UNIDATA/SpecialCasing.txt>: > # <code>; <lower>; <title>; <upper>; (<condition_list>;)? # <comment> [...] > 1FE2; 1FE2; 03A5 0308 0300; 03A5 0308 0300; # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA That means, the correct uppercase of '\u1FE2' is "\u03A5\u0308\u0300". That's three code points. `"\u1FE2".toUpper` correctly returns that. `'\u1FE2'.toUpper` must return a single dchar, so it cannot return the correct string. The documentation of toUpper mentions this.