Add a switch to rev to make it just think in bytes.
$ perl -we 'for(0..0xFF){print chr}'|rev
rev: stdin: Invalid or incomplete multibyte or wide character
Also perhaps remove the \n in the error message.
Dear Maintainer, 'rev' reports the "Invalid or incomplete multibyte or wide character" error whenever if finds a byte above 127 in the C locale (LC_ALL=C). I would expect it to treat one byte as one character in this situation, as does 'sort', for instance. Thanks in advance!
retitle 403124 fgetws chokes on input chars > 0x80 in C locale reassign 403124 libc6 thanks Looks like this is a bug in libc since it is the fgetws call that is trying and failing to convert the input chars.