[perldocjp-cvs 1746] CVS update: docs/perl/5.12.1

Back to archive index

argra****@users***** argra****@users*****
2013年 4月 16日 (火) 04:25:31 JST


Index: docs/perl/5.12.1/perlrecharclass.pod
diff -u docs/perl/5.12.1/perlrecharclass.pod:1.2 docs/perl/5.12.1/perlrecharclass.pod:1.3
--- docs/perl/5.12.1/perlrecharclass.pod:1.2	Tue Apr  2 04:18:15 2013
+++ docs/perl/5.12.1/perlrecharclass.pod	Tue Apr 16 04:25:30 2013
@@ -339,18 +339,19 @@
 
 =end original
 
-C<\N> is new in 5.12, and is experimental.  It, like the dot, will match any
-character that is not a newline. The difference is that C<\N> will not be
-influenced by the single line C</s> regular expression modifier.  Note that
-there is a second meaning of C<\N> when of the form C<\N{...}>.  This form is
-for named characters.  See L<charnames> for those.  If C<\N> is followed by an
-opening brace and something that is not a quantifier, perl will assume that a
-character name is coming, and not this meaning of C<\N>.  For example, C<\N{3}>
-means to match 3 non-newlines; C<\N{5,}> means to match 5 or more non-newlines,
-but C<\N{4F}> and C<\N{F4}> are not legal quantifiers, and will cause perl to
-look for characters named C<4F> or C<F4>, respectively (and won't find them,
-thus raising an error, unless they have been defined using custom names).
-(TBT)
+C<\N> は 5.12 の新機能で、実験的なものです。
+これは、ドットのように、改行以外の任意の文字にマッチングします。
+違いは、C<\N> は単一行 C</s> 正規表現修飾子の影響を受けないことです。
+C<\N{...}> の形式の時には C<\N> の二番目の意味を持つことに注意してください。
+この形式は名前付き文字です。
+それについては L<charnames> を参照してください。
+C<\N> に引き続いて開き中かっこと量指定子でない何かがある場合、
+perl はこの意味での C<\N> ではなく文字名が来ると仮定します。
+例えば、C<\N{3}> は三つの非改行にマッチングします;
+C<\N{5,}> は五つ以上の非改行にマッチングします;
+しかし C<\N{4F}> や C<\N{F4}> は妥当な量指定子ではないので、perl は
+それぞれ C<4F> や C<F4> という名前の文字を探します(そして、独自の名前を
+定義していない限り見つからないのでエラーが発生します)。
 
 =begin original
 
@@ -872,7 +873,8 @@
 =end original
 
 ハイフンのそれぞれの側の二つの文字は両方とも英字であったり両方とも
-数字であったりする必要はありませんが、勧められないことに注意してください。
+数字であったりする必要はないことに注意してください。
+任意の文字が可能ですが、勧められません。
 C<['-?]> は文字の範囲を含みますが、ほとんどの人はどの文字が含まれるか
 分かりません。
 さらに、このような範囲は、コードが EBCDIC のような異なった文字集合を使う
@@ -1009,11 +1011,10 @@
 
 =end original
 
-C<\N> within a bracketed character class must be of the forms C<\N{I<name>}>  or
-C<\N{U+I<wide hex char>}> for the same reason that a dot C<.> inside a
-bracketed character class loses its special meaning: it matches nearly
-anything, which generally isn't what you want to happen.
-(TBT)
+大かっこ文字クラスの中のドット C<.> が特別な意味を持たないのと同じ理由で、
+大かっこ文字クラスの中の C<\N> は C<\N{I<name>}> または
+C<\N{U+I<wide hex char>}> の形式でなければなりません: これはほとんど何でも
+マッチングするので、一般的には起こって欲しいことではありません。
 
 =begin original
 
@@ -1152,11 +1153,11 @@
 
 =end original
 
-Most POSIX character classes have two Unicode-style C<\p> property
-counterparts.  (They are not official Unicode properties, but Perl extensions
-derived from official Unicode properties.)  The table below shows the relation
-between POSIX character classes and these counterparts.
-(TBT)
+ほとんどの POSIX 文字クラスには、対応する二つの Unicode 式の C<\p> 特性が
+あります。
+(これは公式 Unicode 特性ではなく、公式 Unicode 特性から派生した Perl
+エクステンションです。)
+以下の表は POSIX 文字クラスと対応するものとの関連を示します。
 
 =begin original
 
@@ -1166,10 +1167,9 @@
 
 =end original
 
-One counterpart, in the column labelled "ASCII-range Unicode" in
-the table will only match characters in the ASCII range.  (On EBCDIC platforms,
-they match those characters which have ASCII equivalents.)
-(TBT)
+対応物の一つである、表で "ASCII-range Unicode" と書かれた列のものは、
+ASCII の範囲の文字にのみマッチングします。
+(EBCDIC プラットフォームでは、ASCII での等価な文字にマッチングします。)
 
 =begin original
 
@@ -1181,12 +1181,11 @@
 
 =end original
 
-The other counterpart, in the column labelled "Full-range Unicode", matches any
-appropriate characters in the full Unicode character set.  For example,
-C<\p{Alpha}> will match not just the ASCII alphabetic characters, but any
-character in the entire Unicode character set that is considered to be
-alphabetic.
-(TBT)
+もう一つの対応物である、"Full-range Unicode" と書かれた列のものは、
+Unicode 文字集合全体の中の適切な任意の文字にマッチングします。
+例えば、C<\p{Alpha}> は単に ASCII アルファベット文字だけでなく、
+Unicode 文字集合全体の中からアルファベットと考えられる任意の文字に
+マッチングします。
 
 =begin original
 
@@ -1198,12 +1197,12 @@
 
 =end original
 
-(Each of the counterparts has various synonyms as well.
-L<perluniprops/Properties accessible through \p{} and \P{}> lists all the
-synonyms, plus all the characters matched by each of the ASCII-range
-properties.  For example C<\p{AHex}> is a synonym for C<\p{ASCII_Hex_Digit}>,
-and any C<\p> property name can be prefixed with "Is" such as C<\p{IsAlpha}>.)
-(TBT)
+(それぞれの対応物には様々な同義語もあります。
+L<perluniprops/Properties accessible through \p{} and \P{}> に
+全ての同義語と、ASCII 範囲のそれぞれでマッチングする全ての文字の一覧が
+あります。
+例えば、C<\p{AHex}> は C<\p{ASCII_Hex_Digit}> の同義語で、
+任意の C<\p> 特性名は、C<\p{IsAlpha}> のように、"Is" 接頭辞が使えます。)
 
 =begin original
 
@@ -1225,22 +1224,23 @@
 
 =end original
 
-Both the C<\p> forms are unaffected by any locale that is in effect, or whether
-the string is in UTF-8 format or not, or whether the platform is EBCDIC or not.
-In contrast, the POSIX character classes are affected.  If the source string is
-in UTF-8 format, the POSIX classes (with the exception of C<[[:punct:]]>, see
-Note [5]) behave like their "Full-range" Unicode counterparts.  If the source
-string is not in UTF-8 format, and no locale is in effect, and the platform is
-not EBCDIC, all the POSIX classes behave like their ASCII-range counterparts.
-Otherwise, they behave based on the rules of the locale or EBCDIC code page.
-It is proposed to change this behavior in a future release of Perl so that the
-the UTF8ness of the source string will be irrelevant to the behavior of the
-POSIX character classes.  This means they will always behave in strict
-accordance with the official POSIX standard.  That is, if either locale or
-EBCDIC code page is present, they will behave in accordance with those; if
-absent, the classes will match only their ASCII-range counterparts.  If you
-disagree with this proposal, send email to C<perl5****@perl*****>.
-(TBT)
+両方の C<\p> 形式はどのロケールが有効かや、文字列が UTF-8 形式かどうかや、
+プラットフォームが EBCDIC かどうかに影響を受けません。
+一方、POSIX 文字クラスは影響を受けます。
+ソース文字列が UTF-8 形式なら、POSIX クラス (例外は C<[[:punct:]]> です;
+[5] 参照) は「全体」Unicode 版と似た振る舞いをします。
+ソース文字列が UTF-8 形式でなく、ロケールが有効でなく、プラットフォームが
+EBCDIC でなければ、全ての POSIX クラスは ASCII 範囲版と似た振る舞いをします。
+さもなければ、ロケールや EBCDIC コードページのルールに従った振る舞いを
+します。
+Perl の将来のバージョンではこの振る舞いを変えることが提案されています;
+ソース文字列が UTF-8 かどうかで POSIX 文字クラスの振る舞いに影響を
+与えないようにします。
+これにより、常に公式な POSIX 標準に厳密に準拠した振る舞いになります。
+つまり、ロケールや EBCDIC コードページがあれば、準拠した振る舞いをします;
+なければ、クラスは ASCII 範囲版にのみマッチングします。
+この提案に意義があるなら、C<perl5****@perl*****> にメールを
+送ってください。
 
  [[:...:]]      ASCII-range        Full-range  backslash  Note
                  Unicode            Unicode    sequence
@@ -1298,10 +1298,9 @@
 
 =end original
 
-On EBCDIC platforms, it is likely that the code page will define C<[[:cntrl:]]>
-to be the EBCDIC equivalents of the ASCII controls, plus the controls
-that in Unicode have ordinals from 128 through 139.
-(TBT)
+EBCDIC プラットフォームでは、コードページは C<[[:cntrl:]]> を、ASCII
+制御文字の EBCDIC 等価物に加えて、Unicode で序数 128 から 139 を持つものと
+定義しています。
 
 =item [3]
 
@@ -1337,11 +1336,10 @@
 
 =end original
 
-C<\p{PosixPunct}> and C<[[:punct:]]> in the ASCII range match all the
-non-controls, non-alphanumeric, non-space characters:
-C<[-!"#$%&'()*+,./:;<=E<gt>?@[\\\]^_`{|}~]> (although if a locale is in effect,
-it could alter the behavior of C<[[:punct:]]>).
-(TBT)
+ASCII の範囲の C<\p{PosixPunct}> と C<[[:punct:]]> は全ての非制御、非英数字、
+非空白文字にマッチングします:
+C<[-!"#$%&'()*+,./:;<=E<gt>?@[\\\]^_`{|}~]> (しかしロケールが有効なら、
+C<[[:punct:]]> の振る舞いが変わります)。
 
 =begin original
 
@@ -1355,14 +1353,14 @@
 
 =end original
 
-When the matching string is in UTF-8 format, C<[[:punct:]]> matches the above
-set, plus what C<\p{Punct}> matches.  This is different than strictly matching
-according to C<\p{Punct}>, because the above set includes characters that aren't
-considered punctuation by Unicode, but rather "symbols".  Another way to say it
-is that for a UTF-8 string, C<[[:punct:]]> matches all the characters that
-Unicode considers to be punctuation, plus all the ASCII-range characters that
-Unicode considers to be symbols.
-(TBT)
+マッチングする文字列が UTF-8 形式のとき、C<[[:punct:]]> は上述の集合に
+加えて、C<\p{Punct}> にマッチングするものにマッチングします。
+これは C<\p{Punct}> に従って厳密にマッチングするものと違います; なぜなら
+上述の集合には、Unicode で句読点ではなく "symbols" として扱われるものが
+含まれているからです。
+UTF-8 文字列のためのもう一つの言い方は、C<[[:punct:]]> は Unicode が
+句読点として扱うものに加えて、Unicode が "symbols" として扱う ASCII 範囲の
+全ての文字にマッチングします。
 
 =item [6]
 
@@ -1373,9 +1371,9 @@
 
 =end original
 
-C<\p{SpacePerl}> and C<\p{Space}> differ only in that C<\p{Space}> additionally
-matches the vertical tab, C<\cK>.   Same for the two ASCII-only range forms.
-(TBT)
+C<\p{SpacePerl}> と C<\p{Space}> の違いは、C<\p{Space}> は垂直タブ
+C<\cK> にもマッチングすると言うことだけです。
+二つの ASCII のみの範囲の形式では同じです。
 
 =back
 
@@ -1556,8 +1554,8 @@
 
 =begin meta
 
-Translate: SHIRAKATA Kentaro <argra****@ub32*****> (5.10.1)
-Status: in progress
+Translate: SHIRAKATA Kentaro <argra****@ub32*****> (5.10.1-)
+Status: completed
 
 =end meta
 



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