String::UTF8(3) User Contributed Perl Documentation String::UTF8(3) NNAAMMEE String::UTF8 − Determine whether a string consists of well−formed UTF−8 byte sequences SSYYNNOOPPSSIISS use String::UTF8 qw[:all]; $boolean = is_utf8($string); $boolean = is_utf8($string, UTF8_DISALLOW_NONCHARACTERS); DDEESSCCRRIIPPTTIIOONN Determine whether a string consists of well‐formed UTF−8 byte sequences. FFUUNNCCTTIIOONNSS iiss__uuttff88 Determine whether $string consists of well‐formed UTF−8 byte sequences. _U_s_a_g_e $boolean = is_utf8($string); $boolean = is_uft8($string, $flags); _A_r_g_u_m_e_n_t_s $string $flags (optional) _R_e_t_u_r_n_s $boolean _N_o_t_e This function ignores Perl’s internal UTF−8 flag ("SVf_UTF8") and sim‐ ply checks the content of the string. CCOONNSSTTAANNTTSS FFLLAAGGSS UTF8_DISALLOW_NONCHARACTERS If this flag is set, noncharacters is not considered well−formed. EEXXPPOORRTT None by default. Functions and constants can either be imported indi‐ vidually or in sets grouped by tag names. The tag names are: ":all" exports all functions and constants. DDIIAAGGNNOOSSTTIICCSS ((FF)) Usage: %s Subroutine %s invoked with wrong number of arguments. EENNVVIIRROONNMMEENNTT Set the environment variable "STRING_UTF8_PP" to a true value before loading this package to disable usage of XS implementation. PPRREERREEQQUUIISSIITTEESS RRuunn‐‐TTiimmee perl 5.006 or greater. Carp, core module. Exporter, core module. BBuuiilldd‐‐TTiimmee In addition to Run−Time: Test::More 0.47 or greater, core module since 5.6.2. Test::Exception. SSEEEE AALLSSOO String::UTF8::XS AAUUTTHHOORR Christian Hansen, CCOOPPYYRRIIGGHHTT AANNDD LLIICCEENNSSEE Copyright (C) 2009 by Christian Hansen This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.9 2009‐12‐01 String::UTF8(3)