No. It doesn't know anything about Unicode and there's no requirement for the string to be Unicode text.

The documentation is quite clear: In scalar context, the reverse function operates on strings. If the string is Unicode, it reverses Unicode code points. If the string is in some single-byte character encoding such as ISO 8859-1 (Latin 1), then it reverses those characters. It's really very straightforward.

You're once again trying to make some esoteric point about the distinction between strings and bytes, and what is Unicode and what is not Unicode. But your peculiar, persistent point isn't relevant here.

Nothing in my post is incorrect or inaccurate, yet the supercilious tone of your response wrongly implies that something is incorrect. The topic of this discussion is Unicode text, so of course I'm talking about Unicode text in it.

In my experience, "character" is the constituent element of a string, and never a grapheme except by happenstance. Let's just say there is no such consensus.

What is a character in a language is well-understood and rarely, if ever, subject to debate. In the case of Unicode, "character" is well-defined, too: It's a "grapheme." It's as simple as that. Read the Unicode Standard.

There are four characters in the word "Café", not five. When you arrange the four characters in the opposite order, you get "éfaC". This fact is the very basis of this tutorial and discussion.

No. reverse provides a vital string operation. It should not assume the string is Unicode text.

Your insistence that there's a difference between "string" and "text" may have some strange basis in the arcane details of the internals of Perl, but it has no relevance to this discussion. The whole premise of this discussion is that we're trying to reverse Unicode strings (Unicode text). And the salient point about Perl's reverse function is that it fails to reverse properly an infinite number of possible Unicode strings.

Reversing text is also a useful function, but it is not provided by reverse.

This is a bizarre and incomprehensible statement.

What's the difference between a "string" and "text" to someone writing a Perl program?

The documentation is quite clear: In scalar context, the reverse function operates on strings

Yes.

You're once again trying to make some esoteric point about the distinction between strings and bytes,

No. Quite the opposite, I'm saying there is no distinction. reverse doesn't know or care what the string is, and has no way of knowing. It will reverse the characters (elements?) of the string.

What is a character in a language is well-understood and rarely, if ever, subject to debate

You opened the debate! Again, a common CS definition is used here: A string is a sequence of elements named characters. Would you care to suggest an alternative?

What is a character in a language is well-understood and rarely, if ever, subject to debate. In the case of Unicode, "character" is well-defined, too: It's a "grapheme." It's as simple as that. Read the Unicode Standard.

Unicode has four definitions for "character", and none correspond exactly to that of "grapheme".

But that's wholly inappropriate for water level measurements or for anything else the string might be.

There is need for a function that reverses strings (chr(101).chr(769) ⇒ chr(769).chr(101)). There is also a need for a function that reverses text (chr(101).chr(769) ⇒ chr(101).chr(769)). reverse does the former.

Your rhetorical volley is irrelevant and off-topic as it has nothing whatever to do with Unicode.

My simple, clear, plain point is that the Perl reverse function is broken because when it reverses what is simply, clearly, plainly a Unicode string with grapheme clusters or jamo in it, it gets it wrong.

I don't understand your point. Of course it doesn't handle Unicode. We've always been in agreement about that. The conversation started when you claimed it should and that it shouldn't handle code you just called "rhetorical" and "irrelevant".