See L<PerlIO> for more information.
+See also L<encoding> for how to change the default encoding of the
+script itself.
+
=head1 Encoding How to ...
To do:
=head1 SEE ALSO
-L<perlunicode>, L<perlebcdic>, L<perlfunc/open>, L<PerlIO>
+L<perlunicode>, L<perlebcdic>, L<perlfunc/open>, L<PerlIO>, L<encoding>
=cut
The C<\x..> and C<\0...> in regular expressions are not
affected by this pragma. They probably should.
-Also C<\N{...}> might become affected.
+Also chr(), ord(), and C<\N{...}> might become affected.
=head1 SEE ALSO
=head1 SEE ALSO
-L<perlfunc/"binmode">, L<perlfunc/"open">, L<perlunicode>, L<PerlIO>
+L<perlfunc/"binmode">, L<perlfunc/"open">, L<perlunicode>, L<PerlIO>,
+L<encoding>
=cut
will be converted into Unicode (and UTF-8).
If the sv already is UTF-8 (or if it is not POK), or if the encoding
-is not an object, nothing is done to the sv.
-
-If the encoding is not Encode object, bad things happen.
+is not a reference, nothing is done to the sv. If the encoding is not
+an C<Encode::XS> Encoding object, bad things will happen.
+(See F<lib/encoding.pm> and L<Encode>).
The PV of the sv is returned.
- void sv_recode_to_utf8(SV* sv, SV *encoding)
+ char* sv_recode_to_utf8(SV* sv, SV *encoding)
=for hackers
Found in file sv.c
B<NOTE: this should be the only place where an explicit C<use utf8> is
needed>.
+You can also use the C<encoding> pragma to change the default encoding
+of the whole script; see L<encoding>.
+
=back
=head2 Byte and Character semantics
If the sv already is UTF-8 (or if it is not POK), or if the encoding
is not a reference, nothing is done to the sv. If the encoding is not
-Encode object, bad things happen.
+an C<Encode::XS> Encoding object, bad things will happen.
+(See F<lib/encoding.pm> and L<Encode>).
The PV of the sv is returned.