From 6d8e74506f971081362433e3d39fe2e4da9fb302 Mon Sep 17 00:00:00 2001 From: Pali Date: Sun, 18 Sep 2016 17:19:59 +0200 Subject: pod: Suggest to use strict :encoding(UTF-8) PerlIO layer over not strict :encoding(utf8) For data exchange it is better to use strict UTF-8 encoding and not perl's utf8. --- lib/open.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/open.pm') diff --git a/lib/open.pm b/lib/open.pm index fd22e1b9e7..ca3cf7b409 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -1,7 +1,7 @@ package open; use warnings; -our $VERSION = '1.10'; +our $VERSION = '1.11'; require 5.008001; # for PerlIO::get_layers() @@ -153,7 +153,7 @@ open - perl pragma to set default PerlIO layers for input and output use open IO => ':locale'; - use open ':encoding(utf8)'; + use open ':encoding(UTF-8)'; use open ':locale'; use open ':encoding(iso-8859-7)'; @@ -195,8 +195,8 @@ For example: These are equivalent - use open ':encoding(utf8)'; - use open IO => ':encoding(utf8)'; + use open ':encoding(UTF-8)'; + use open IO => ':encoding(UTF-8)'; as are these @@ -221,8 +221,8 @@ The C<:std> subpragma on its own has no effect, but if combined with the C<:utf8> or C<:encoding> subpragmas, it converts the standard filehandles (STDIN, STDOUT, STDERR) to comply with encoding selected for input/output handles. For example, if both input and out are -chosen to be C<:encoding(utf8)>, a C<:std> will mean that STDIN, STDOUT, -and STDERR are also in C<:encoding(utf8)>. On the other hand, if only +chosen to be C<:encoding(UTF-8)>, a C<:std> will mean that STDIN, STDOUT, +and STDERR are also in C<:encoding(UTF-8)>. On the other hand, if only output is chosen to be in C<< :encoding(koi8r) >>, a C<:std> will cause only the STDOUT and STDERR to be in C. The C<:locale> subpragma implicitly turns on C<:std>. -- cgit v1.2.1