[Issue 391] New: .sort and .reverse break utf8 encoding
Stewart Gordon
smjg_1998 at yahoo.com
Tue Oct 3 13:43:46 PDT 2006
d-bugmail at puremagic.com wrote:
<snip>
> import std.utf;
> import std.stdio;
> void main()
> {
> char[] a;
> a = "\u3026\u2021\u3061\n";
> writefln("plain"); validate(a);
> writefln("sorted"); validate(a.sort); // fails
> writefln("reversed"); validate(a.reverse); // fails
> }
AIUI sort and reverse are defined to sort/reverse the individual
elements of the array, rather than the Unicode characters that make up a
string. But hmm....
Stewart.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------
My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
More information about the Digitalmars-d-bugs
mailing list