www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 330] New: std.string.tolower / std.string.toupper broken for non-ASCII strings

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

           Summary: std.string.tolower / std.string.toupper broken for non-
                    ASCII strings
           Product: D
           Version: 0.166
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thomas-dloop kuehne.cn


On 2005-11-22, Shawn Liu originally reported the tolower/toupper issue
(dltv86$tvu$1 digitaldaemon.com).

# import std.string;
# import std.stdio;
# 
# int main(){
#    char[] a = "A\u0410";
# 
#    char[] b = tolower(a);
#    char[] c = toupper(b);
# 
#    writefln("a: %s", cast(ubyte[]) a);
#    writefln("b: %s", cast(ubyte[]) b);
#    writefln("c: %s", cast(ubyte[]) c);
# 
#    return 0;
# }

Output:
a: [65,208,144]
b: [97,208,144,208,176]
c: [65,208,144,208,176,208,144,208,144]

Expected output:
a: [65,208,144]
b: [97,208,176]
c: [65,208,144]


-- 
Sep 07 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=330





------- Comment #1 from thomas-dloop kuehne.cn  2006-09-07 16:51 -------
Created an attachment (id=25)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=25&action=view)
fixed std.string.toupper / std.string.tolower


-- 
Sep 07 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=330


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #2 from bugzilla digitalmars.com  2006-11-09 02:14 -------
Fixed DMD 0.173


-- 
Nov 09 2006