On 28.05.14 03:11, Andres Valloud wrote:
What is going to happen when one compares two general Unicode series of
characters that represent the same string but differ in normalization?
Wouldn't the size test would result in false negatives?

Yes but #= is blissfully unaware of normalization in Squeak/Pharo. In fact AFAIK Squeak/Pharo is unaware of normalization. Having a short look at it doesn't even look as if case insensitivity worked in Squeak/Pharo outside of Latin-1 (I could be wrong though).

In addition you probably don't want #= to do normalization "because performance". And even if you did you probably still want a fast path for ByteString receiver and ByteString argument in which case #size is safe.

Cheers
Philippe



Reply via email to