Lines Matching defs:utf8

1 package utf8;
3 $utf8::hint_bits = 0x00800000;
8 $^H |= $utf8::hint_bits;
13 $^H &= ~$utf8::hint_bits;
27 utf8 - Perl pragma to enable/disable UTF-8 (or UTF-EBCDIC) in source code
31 use utf8;
32 no utf8;
35 $num_octets = utf8::upgrade($string);
36 $success = utf8::downgrade($string[, FAIL_OK]);
39 utf8::encode($string);
40 utf8::decode($string);
42 $flag = utf8::is_utf8(STRING); # since Perl 5.8.1
43 $flag = utf8::valid(STRING);
47 The C<use utf8> pragma tells the Perl parser to allow UTF-8 in the
49 platforms). The C<no utf8> pragma tells Perl to switch back to treating
72 Enabling the C<utf8> pragma has the following effect:
89 (for example embedded Latin-1 in your string literals), C<use utf8>
91 UTF-8. If you want to have such bytes and use utf8, you can disable
92 utf8 until the end the block (or file, if at top level) by C<no utf8;>.
103 In case you are wondering: yes, C<use encoding 'utf8';> works much
104 the same as C<use utf8;>.
108 The following functions are defined in the C<utf8::> package by the
109 Perl core. You do not need to say C<use utf8> to use these and in fact
114 =item * $num_octets = utf8::upgrade($string)
125 =item * $success = utf8::downgrade($string[, FAIL_OK])
136 =item * utf8::encode($string)
144 handle just ISO 8859-1 (or EBCDIC), you could use utf8::upgrade().
146 =item * utf8::decode($string)
154 to handle just ISO 8859-1 (or EBCDIC), you could use utf8::downgrade().
156 =item * $flag = utf8::is_utf8(STRING)
161 =item * $flag = utf8::valid(STRING)
168 probably want to use utf8::is_utf8() instead.
172 C<utf8::encode> is like C<utf8::upgrade>, but the UTF8 flag is
176 C<utf8::upgrade>, C<utf8::downgrade>, C<utf8::encode> and
177 C<utf8::decode>. Note that in the Perl 5.8.0 and 5.8.1 implementation
178 the functions utf8::is_utf8, utf8::valid, utf8::encode, utf8::decode,
179 utf8::upgrade, and utf8::downgrade are always available, without a
180 C<require utf8> statement-- this may change in future releases.