On Mon, Feb 20, 2017 at 9:46 PM, Kent Fredric <kentfredric@gmail.com> wrote: > * "$flag = utf8::is_upgraded($string)" > > (Since Perl 5.28) Test whether $string 's internal bytes are > marked > for interpretation via utf8 semantics or not. Note this bears > no impact on whether that > data is actually utf8, only how perl functions such as > "length" should treat its bytes. > > * "$flag = utf8::is_utf8($string)" > (Since Perl 5.8.1) Compatibility-supporting (but poorly named) > alias of > utf8::is_upgraded > > > Its a bit wordy, but probably progress. > I think it would be helpful to explicitly mention that the whole «encode if is_utf8» is essentially always wrong. And to link to a longer explanation in perlunisomething of why it is wrong. Though that said, I think we can find a clearer name than "is_upgraded" > is_multibyte? LeonThread Previous | Thread Next