← Back to index
|
Original Bugzilla link
Bug 330 – std.string.tolower / std.string.toupper broken for non-ASCII strings
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-09-07T16:50:00Z
Last change time
2014-02-15T13:28:56Z
Keywords
patch
Assigned to
bugzilla
Creator
thomas-dloop
Attachments
ID
Filename
Summary
Content-Type
Size
25
string_casing.d
fixed std.string.toupper / std.string.tolower
text/plain
2099
Comments
Comment #0
by thomas-dloop — 2006-09-07T16:50:40Z
On 2005-11-22, Shawn Liu originally reported the tolower/toupper issue (
[email protected]
). # 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]
Comment #1
by thomas-dloop — 2006-09-07T16:51:54Z
Created attachment 25 fixed std.string.toupper / std.string.tolower
Comment #2
by bugzilla — 2006-11-09T02:14:42Z
Fixed DMD 0.173