I was hoping for a more elegant solution and generic solution using Encode
As you can see in my demo in the other answer is Encode using "\x{FFFD}" to decode the broken character.
When it's reliable° in doing so, this could lead to better code.
Not sure what other multi-byte encodings are out there...
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
°) It is: from Encode If CHECK is 0, encoding and decoding replace any malformed character with a substitution character. When you encode, SUBCHAR is used. When you decode, the Unicode REPLACEMENT CHARACTER, code point U+FFFD, is used. If the data is supposed to be UTF-8, an optional lexical warning of warning category "utf8" is given.
The Flag FB_QUIET seems to be the answer
In reply to Re^2: Processing an encoded file backwards
by LanX
in thread Processing an encoded file backwards
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |