in reply to Re^3: Mixed Unicode and ANSI string comparisons?
in thread Mixed Unicode and ANSI string comparisons?

No, as far as perl is concerned, you start with 4 Unicode strings and get 8 Unicode strings... in different storage formats. utf8 flag says pretty much nothing about "Unicodeness".
And now I remembered that LATIN_SMALL_LETTER_C_WITH_CEDILLA is codepoint 231 and you didn't use feature 'unicode_strings' (or, more commonly, use 5.012)... So yeah, you had 3 Unicode strings and 1 non-Unicode, "c" being Unicode (utf8 off), CEDILLA non-Unicode (utf8 on...) Interesting, isn't it? :)

Replies are listed 'Best First'.
Re^5: Mixed Unicode and ANSI string comparisons?
by choroba (Cardinal) on Dec 15, 2015 at 09:08 UTC
    Adding unicode_strings doesn't change the output in any way.
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      It doesn't change sort, but it would change some other operations though.