From: Jarkko Hietaniemi Date: Wed, 31 Oct 2001 02:19:49 +0000 (+0000) Subject: More documentation for the encode pragma. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1768d7ebbd79c945a432bd18f2f9bed6d1a79356;p=p5sagit%2Fp5-mst-13.2.git More documentation for the encode pragma. p4raw-id: //depot/perl@12785 --- diff --git a/ext/Encode/Encode.pm b/ext/Encode/Encode.pm index 6ddcb32..19827db 100644 --- a/ext/Encode/Encode.pm +++ b/ext/Encode/Encode.pm @@ -867,6 +867,9 @@ More examples: See L for more information. +See also L 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, L, L, L +L, L, L, L, L =cut diff --git a/lib/encoding.pm b/lib/encoding.pm index 1addeb4..1c9838e 100644 --- a/lib/encoding.pm +++ b/lib/encoding.pm @@ -45,7 +45,7 @@ C matters, and it affects B. 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 3d7782f..d8a6350 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -156,6 +156,7 @@ level. =head1 SEE ALSO -L, L, L, L +L, L, L, L, +L =cut diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 516b2e7..89894fc 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 Encoding object, bad things will happen. +(See F and L). 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 9205fdf..273cce0 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 is needed>. +You can also use the C pragma to change the default encoding +of the whole script; see L. + =back =head2 Byte and Character semantics diff --git a/sv.c b/sv.c index c5511b0..553267a 100644 --- a/sv.c +++ b/sv.c @@ -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 Encoding object, bad things will happen. +(See F and L). The PV of the sv is returned.