About the C code: you're talking about C code that tries to interpret the invalid utf-8, right?
Yes. I was specifically (but implicitly) referring to XS code, C code catered for Perl interaction. The UTF8 flag is interpreted as a promise that the buffer will be valid UTF8. Of course, it would be better to use Perl's macros for UTF8 handling, but that doesn't work if you're calling a library function that doesn't do SVs but does require valid UTF-8.
about the (removed) line: "Another possibility is careless use of utf8::upgrade()." That's removed because utf8::upgrade() is always safe (if you start out with valid utf-8 flags), right?
Exactly. The original author probably confused utf8::upgrade with Encode::_utf8_on.
In reply to Re^6: A UTF8 round trip with MySQL
by Juerd
in thread A UTF8 round trip with MySQL
by clinton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |