[Issue 330] New: std.string.tolower / std.string.toupper broken for non-ASCII strings
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 7 14:50:44 PDT 2006
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 at digitalmars.com
ReportedBy: thomas-dloop at kuehne.cn
On 2005-11-22, Shawn Liu originally reported the tolower/toupper issue
(dltv86$tvu$1 at 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]
--
More information about the Digitalmars-d-bugs
mailing list