in reply to Re: deal with incorrectly set utf8 flag
in thread deal with incorrectly set utf8 flag
It appears that utf8::downgrade alters the bytes in the scalar. I'm exactly seeking to avoid this. I want to use the bytes in the scalar without Perl's utf8-handling kicking in.
The library in question read binary (non-character) data from a database field. It had no business marking the data as utf8, but it did so anyway. Now I'm looking to use the binary data without any conversions or warnings.
It looks like I can use Encode::_utf8_off, but this is documented as an internal function that shouldn't be relied on. It looks like "use bytes" works, but I don't know if this is the way it should be done. I am looking to find the way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: deal with incorrectly set utf8 flag
by ikegami (Patriarch) on Mar 27, 2009 at 16:40 UTC | |
by Anonymous Monk on Mar 27, 2009 at 16:48 UTC | |
by ikegami (Patriarch) on Mar 27, 2009 at 16:53 UTC |