http://www.perlmonks.org?node_id=885331


in reply to Re^6: Repurposing reverse
in thread How to reverse a (Unicode) string

The discussion isn't about Unicode…

Yes it is about Unicode. "Unicode" is in the subject. Please go start your own discussion of water level measurements somewhere else.

reverse doesn't perform a Unicode operation.

Yes it does. Every time it reverses a Unicode string, it performs a Unicode operation.

What kind of operation is this Perl code performing?

use utf8; $utf8_text =~ s/\p{General_Category=Currency_Symbol}+/€/g;

Not a Unicode operation?

Replies are listed 'Best First'.
Re^8: Repurposing reverse
by ikegami (Patriarch) on Jan 31, 2011 at 19:21 UTC

    Yes it is about Unicode. "Unicode" is in the subject.

    Sorry for not setting the subject correctly. Fixed.

    Every time it reverses a Unicode string, it performs a Unicode operation.

    We've both said that it doesn't. At issue is whether it should. I would like it to, but I'm not sure it's possible.

    What kind of operation is this Perl code performing?

    A substitution based on a Unicode property match.

    Not a Unicode operation?

    I agree that it is. substr, length and reverse are not, though.