[Issue 9629] toUpperInPlace doesn't work properly with unicode characters

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 1 20:24:25 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9629


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich at gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-03-01 20:24:24 PST ---
(In reply to comment #0)
> wchar[] test = "hello þ world"w.dup;
> toUpperInPlace(test[6..7]);
> assert(test == "hello Þ world");
> 
> The unicode letter Thorn is not converted in place.

I'm noticing something strange:

import std.string;
import std.stdio;

void main()
{
    wchar[] test = "abþdefg"w.dup;
    toUpperInPlace(test[0 .. $]);
    writeln(test);
}

writes: ABþdefg

Note how it stops uppercasing after that character.

-- 
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