diff options
-rw-r--r-- | ext/Encode/Encode.pm | 5 | ||||
-rw-r--r-- | lib/encoding.pm | 2 | ||||
-rw-r--r-- | lib/open.pm | 3 | ||||
-rw-r--r-- | pod/perlapi.pod | 8 | ||||
-rw-r--r-- | pod/perlunicode.pod | 3 | ||||
-rw-r--r-- | sv.c | 3 |
6 files changed, 16 insertions, 8 deletions
diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 6ddcb32132..19827db07d 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -867,6 +867,9 @@ More examples: 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: @@ -1089,7 +1092,7 @@ to be rationalized. =head1 SEE ALSO -L<perlunicode>, L<perlebcdic>, L<perlfunc/open>, L<PerlIO> +L<perlunicode>, L<perlebcdic>, L<perlfunc/open>, L<PerlIO>, L<encoding> =cut diff --git a/lib/encoding.pm b/lib/encoding.pm index 1addeb469b..1c9838e7aa 100644 --- a/lib/encoding.pm +++ b/lib/encoding.pm @@ -45,7 +45,7 @@ C<use encoding> matters, and it affects B<the whole script>. 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 diff --git a/lib/open.pm b/lib/open.pm index 3d7782fc8b..d8a6350c1d 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -156,6 +156,7 @@ level. =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 diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 516b2e7243..89894fcd36 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -3669,13 +3669,13 @@ of the sv is assumed to be octets in that encoding, and the sv 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 diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 9205fdf77c..273cce0026 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -52,6 +52,9 @@ ASCII based machines or recognize UTF-EBCDIC on EBCDIC based machines. 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 @@ -10368,7 +10368,8 @@ 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 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. |