Unicode handling comparison

bearophile bearophileHUGS at lycos.com
Wed Nov 27 07:34:10 PST 2013


David Nadlinger:

> If you need to perform this kind of operations on Unicode 
> strings in D, you can call normalize (std.uni) on the string 
> first to make sure it is in one of the Normalization Forms. For 
> example, just appending .normalize to your strings (which 
> defaults to NFC) would make the code produce the "expected" 
> results.
>
> As far as I'm aware, this behavior is the result of a 
> deliberate decision, as normalizing strings on the fly isn't 
> really cheap.

Thank you :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list