www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10204] New: std.string does not take title case into account

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10204

           Summary: std.string does not take title case into account
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: monarchdodra gmail.com


--- Comment #0 from monarchdodra gmail.com 2013-05-29 09:53:36 PDT ---
Unicode 6.2.0 introduces the notion of "Title case", making the trio of:

"Lower case" => "Title case" => "Upper case"

Example:
01c6  01c5  01c4
dž     Dž     DŽ

This means that functions such as "capitalize" are wrong because they make the
assumption that "Capitalize" == "Uppercase"

Also, the tests such as:

if(std.uni.isLower(c))
    c = std.uni.toUpper(c);

are wrong, as non lower case characters may have upper case representations...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 29 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10204



--- Comment #1 from monarchdodra gmail.com 2013-05-29 12:19:47 PDT ---
Partially fixed here:
https://github.com/D-Programming-Language/phobos/pull/1322

Fixes only to[Upper|Lower](InPlace).

however, "capitalize" is still broken.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 29 2013