2021-8-19日 2:17 Felipe Gasper <felipe@felipegasper.com> wrote: > Per recent IRC discussion … > > PROBLEM: The naming of Perl’s “UTF-8 flag” is a continual source of > confusion regarding the flag’s significance. Some think it indicates > whether a given PV stores text versus binary. Some think it means that the > PV is valid UTF-8. Still others likely hold other inaccurate views. > h, be an auspicious confusion that eventually clarifies rather than > misleads. I feel that the starting point for this discussion is that people misunderstand that the current Perl implementation can distinguish between binary and text. On this point, I agree with Feripe. People likely to believe utf8::is_utf8 : 0 : this string is binary utf8::is_utf8 : 1 : this string is text However, this is completely wrong. Current Perl can't make this distinction. Perl freely changes this interpretation for performance and use. The meaning is as follows. ・Interpretation considered bytes ・Interpretation considered UTF-8 charactersThread Previous | Thread Next