[perldocjp-cvs 1866] CVS update: docs/perl/5.16.1

Back to archive index

argra****@users***** argra****@users*****
2014年 4月 10日 (木) 03:41:14 JST


Index: docs/perl/5.16.1/perllocale.pod
diff -u docs/perl/5.16.1/perllocale.pod:1.5 docs/perl/5.16.1/perllocale.pod:1.6
--- docs/perl/5.16.1/perllocale.pod:1.5	Fri Mar  7 04:14:59 2014
+++ docs/perl/5.16.1/perllocale.pod	Thu Apr 10 03:41:14 2014
@@ -95,16 +95,16 @@
 
 =end original
 
-Perl continues to support the old locale system, and starting in v5.16,
-provides a hybrid way to use the Unicode character set, along with the
-other portions of locales that may not be so problematic.
-(Unicode is also creating C<CLDR>, the "Common Locale Data Repository",
-L<http://cldr.unicode.org/> which includes more types of information than
-are available in the POSIX locale system.  At the time of this writing,
-there was no CPAN module that provides access to this XML-encoded data.
-However, many of its locales have the POSIX-only data extracted, and are
-available at L<http://unicode.org/Public/cldr/latest/>.)
-(TBT)
+Perl は古いロケールシステムへの対応を続け、v5.16 から、Unicode 文字集合を、
+あまり問題にならないかもしれないロケールのその他の部分と共に使うための
+混成的な方法を提供しています。
+(Unicode はまた、POSIX ロケールシステムで利用可能なものよりも多くの種類の
+情報を含む C<CLDR>, "Common Locale Data Repository",
+L<http://cldr.unicode.org/> を作成します。
+これを書いている時点で、この XML エンコードされたデータへのアクセスを提供する
+モジュールはありません。
+しかし、ロケールの多くは POSIX のデータを展開したもののみを持ち、
+L<http://unicode.org/Public/cldr/latest/> で利用可能です。)
 
 =head1 WHAT IS A LOCALE
 
@@ -119,10 +119,10 @@
 
 =end original
 
+ロケールとは、
 A locale is a set of data that describes various aspects of how various
-communities in the world categorize their world.  These categories are
-broken down into the following types (some of which include a brief
-note here):
+communities in the world categorize their world.
+これらのカテゴリは以下の型に分解されます(一部は概略の説明もあります):
 (TBT)
 
 =over
@@ -2630,11 +2630,12 @@
 
 この形式のプラグマが使われると、ロケールの文字以外の部分、たとえば
 C<LC_NUMERIC>、のみが Perl によって使われます。
-Perl assumes that
+Perl は、assumes that
 you have translated all the characters it is to operate on into Unicode
 (actually the platform's native character set (ASCII or EBCDIC) plus
-Unicode).  For data in files, this can conveniently be done by also
-specifying
+Unicode).
+ファイルのデータについては、これは以下のように指定することでも
+便利に行えます
 (TBT)
 
     use open ':locale';
@@ -2654,17 +2655,16 @@
 
 =end original
 
-This pragma arranges for all inputs from files to be translated into
-Unicode from the current locale as specified in the environment (see
-L</ENVIRONMENT>), and all outputs to files to be translated back
-into the locale.  (See L<open>).  On a per-filehandle basis, you can
-instead use the L<PerlIO::locale> module, or the L<Encode::Locale>
-module, both available from CPAN.  The latter module also has methods to
-ease the handling of C<ARGV> and environment variables, and can be used
-on individual strings.  Also, if you know that all your locales will be
-UTF-8, as many are these days, you can use the L<B<-C>|perlrun/-C>
-command line switch.
-(TBT)
+このプラグマは、ファイルからの全ての入力について環境変数で指定されている
+ロケール (L</ENVIRONMENT> 参照) から Unicode への変換と、ファイルへの
+全ての出力についてそのロケールへ逆変換を行います。
+(L<open> 参照)。
+ファイルハンドル単位では、どちらも CPAN から利用可能である
+L<PerlIO::locale> モジュールか L<Encode::Locale> が代わりに使えます。
+後者のモジュールは C<ARGV> と環境変数の扱いを簡単にするメソッドも持ち、
+個々の文字列で使えます。
+また、最近多い状況として、使うロケールが UTF-8 だけであることが
+分かっているなら、L<B<-C>|perlrun/-C> コマンドラインオプションが使えます。
 
 =begin original
 
@@ -2676,12 +2676,11 @@
 
 =end original
 
-This form of the pragma allows essentially seamless handling of locales
-with Unicode.  The collation order will be Unicode's.  It is strongly
-recommended that when you need to order and sort strings that you use
-the standard module L<Unicode::Collate> which gives much better results
-in many instances than you can get with the old-style locale handling.
-(TBT)
+この形式のプラグマは、本質的にロケールと Unicode の扱いをシームレスにします。
+照合順序は Unicode のものです。
+文字列の順序とソートが必要な場合は、古い形式のロケール操作よりも
+多くの場合に遙かによい結果を得られる、L<Unicode::Collate> 標準モジュールを
+使うことを強く勧めます。
 
 =begin original
 
@@ -2789,16 +2788,15 @@
 
 =end original
 
-Another problem with this approach is that operations that cross the
-single byte/multiple byte boundary are not well-defined, and so are
-disallowed.  (This boundary is between the codepoints at 255/256.).
-For example, lower casing LATIN CAPITAL LETTER Y WITH DIAERESIS (U+0178)
-should return LATIN SMALL LETTER Y WITH DIAERESIS (U+00FF).  But in the
-Greek locale, for example, there is no character at 0xFF, and Perl
-has no way of knowing what the character at 0xFF is really supposed to
-represent.  Thus it disallows the operation.  In this mode, the
-lowercase of U+0178 is itself.
-(TBT)
+この手法のもう一つの問題は、1 バイト/複数バイトの境界をまたぐ操作は
+未定義なので、許可されていません。
+(この境界は符号位置 255/256 の間です。)
+例えば LATIN CAPITAL LETTER Y WITH DIAERESIS (U+0178) の小文字化は
+LATIN SMALL LETTER Y WITH DIAERESIS (U+00FF) を返すべきです。
+しかし、例えばギリシャ語ロケールでは、0xFF に文字はなく、Perl には 0xFF の
+文字が実際に何を表現しているかを知る方法はありません。
+従ってこの操作は許可されません。
+このモードでは、U+0178 の小文字は自分自身です。
 
 =begin original
 
@@ -2885,15 +2883,15 @@
 
 =end original
 
-Note: The policy of using locale rules for code points that can fit in a
-byte, and Unicode rules for those that can't is not uniformly applied.
-Pre-v5.12, it was somewhat haphazard; in v5.12 it was applied fairly
-consistently to regular expression matching except for bracketed
-character classes; in v5.14 it was extended to all regex matches; and in
-v5.16 to the casing operations such as C<"\L"> and C<uc()>.  For
-collation, in all releases, the system's C<strxfrm()> function is called,
-and whatever it does is what you get.
-(TBT)
+注意、1 バイトに収まる符号位置に対してロケールの規則を使うポリシーと、
+収まらないものに対する Unicode の規則を使うポリシーについては、一律には
+適用されません。
+v5.12 より前では、これは場当たり的でした; v5.12 では、大かっこ文字クラス以外の
+正規表現マッチングではかなり一貫して適用されました; v5.14 では全ての
+正規表現マッチングに拡大されました; v5.16 では C<"\L"> や C<uc()> のような
+大文字小文字操作に拡大されました。
+照合については、全てのリリースについて、システムの C<strxfrm()> 関数が
+呼び出され、その結果が結果となります。
 
 =head1 BUGS
 



perldocjp-cvs メーリングリストの案内
Back to archive index