[Issue 16005] std.uni.toUpper returns wrong value for U+1FE2

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 9 12:51:25 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16005

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0aep6g at gmail.com

--- Comment #1 from ag0aep6g at gmail.com ---
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.

--


More information about the Digitalmars-d-bugs mailing list