in reply to Re: Processing an encoded file backwards
in thread Processing an encoded file backwards
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Processing an encoded file backwards
by haukex (Archbishop) on Jan 18, 2020 at 20:56 UTC | |
by LanX (Saint) on Jan 18, 2020 at 21:16 UTC | |
by haukex (Archbishop) on Jan 18, 2020 at 21:53 UTC | |
by LanX (Saint) on Jan 18, 2020 at 22:30 UTC | |
by choroba (Cardinal) on Jan 18, 2020 at 23:13 UTC | |
|