77msgstr ""
88"Project-Id-Version : Python 3.13\n "
99"Report-Msgid-Bugs-To : \n "
10- "POT-Creation-Date : 2024 -09-23 07:52+0800 \n "
10+ "POT-Creation-Date : 2025 -09-01 21:59+0000 \n "
1111"PO-Revision-Date : 2018-05-23 16:14+0000\n "
1212"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
1313"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -26,8 +26,8 @@ msgstr ":mod:`!unicodedata` --- Unicode 資料庫"
2626msgid ""
2727"This module provides access to the Unicode Character Database (UCD) which "
2828"defines character properties for all Unicode characters. The data contained "
29- "in this database is compiled from the `UCD version 15.1.0 <https://"
30- "www. unicode.org/Public/15.1.0/ucd>`_."
29+ "in this database is compiled from the `UCD version 15.1.0 <https://www. "
30+ "unicode.org/Public/15.1.0/ucd>`_."
3131msgstr ""
3232
3333#: ../../library/unicodedata.rst:23
@@ -37,84 +37,177 @@ msgid ""
3737"tr44/>`_. It defines the following functions:"
3838msgstr ""
3939
40- #: ../../library/unicodedata.rst:31
40+ #: ../../library/unicodedata.rst:30
41+ msgid ""
42+ "The :ref:`unicode-howto` for more information about Unicode and how to use "
43+ "this module."
44+ msgstr ""
45+
46+ #: ../../library/unicodedata.rst:36
4147msgid ""
4248"Look up character by name. If a character with the given name is found, "
43- "return the corresponding character. If not found, :exc:`KeyError` is raised."
49+ "return the corresponding character. If not found, :exc:`KeyError` is "
50+ "raised. For example::"
51+ msgstr ""
52+
53+ #: ../../library/unicodedata.rst:40
54+ msgid ""
55+ ">>> unicodedata.lookup('LEFT CURLY BRACKET')\n"
56+ "'{'"
57+ msgstr ""
58+
59+ #: ../../library/unicodedata.rst:43
60+ msgid ""
61+ "The characters returned by this function are the same as those produced by "
62+ "``\\ N`` escape sequence in string literals. For example::"
63+ msgstr ""
64+
65+ #: ../../library/unicodedata.rst:46
66+ msgid ""
67+ ">>> unicodedata.lookup('MIDDLE DOT') == '\\ N{MIDDLE DOT}'\n"
68+ "True"
4469msgstr ""
4570
46- #: ../../library/unicodedata.rst:34
71+ #: ../../library/unicodedata.rst:49
4772msgid "Support for name aliases [#]_ and named sequences [#]_ has been added."
4873msgstr ""
4974
50- #: ../../library/unicodedata.rst:40
75+ #: ../../library/unicodedata.rst:55
5176msgid ""
5277"Returns the name assigned to the character *chr* as a string. If no name is "
5378"defined, *default* is returned, or, if not given, :exc:`ValueError` is "
54- "raised."
79+ "raised. For example::"
80+ msgstr ""
81+
82+ #: ../../library/unicodedata.rst:59
83+ msgid ""
84+ ">>> unicodedata.name('½')\n"
85+ "'VULGAR FRACTION ONE HALF'\n"
86+ ">>> unicodedata.name('\\ uFFFF', 'fallback')\n"
87+ "'fallback'"
5588msgstr ""
5689
57- #: ../../library/unicodedata.rst:47
90+ #: ../../library/unicodedata.rst:67
5891msgid ""
5992"Returns the decimal value assigned to the character *chr* as integer. If no "
60- "such value is defined, *default* is returned, or, if not "
61- "given, :exc:`ValueError` is raised."
93+ "such value is defined, *default* is returned, or, if not given, :exc:"
94+ "`ValueError` is raised. For example::"
95+ msgstr ""
96+
97+ #: ../../library/unicodedata.rst:71
98+ msgid ""
99+ ">>> unicodedata.decimal('\\ N{ARABIC-INDIC DIGIT NINE}')\n"
100+ "9\n"
101+ ">>> unicodedata.decimal('\\ N{SUPERSCRIPT NINE}', -1)\n"
102+ "-1"
62103msgstr ""
63104
64- #: ../../library/unicodedata.rst:54
105+ #: ../../library/unicodedata.rst:79
65106msgid ""
66107"Returns the digit value assigned to the character *chr* as integer. If no "
67- "such value is defined, *default* is returned, or, if not "
68- "given, :exc:`ValueError` is raised."
108+ "such value is defined, *default* is returned, or, if not given, :exc:"
109+ "`ValueError` is raised::"
110+ msgstr ""
111+
112+ #: ../../library/unicodedata.rst:83
113+ msgid ""
114+ ">>> unicodedata.digit('\\ N{SUPERSCRIPT NINE}')\n"
115+ "9"
69116msgstr ""
70117
71- #: ../../library/unicodedata.rst:61
118+ #: ../../library/unicodedata.rst:89
72119msgid ""
73120"Returns the numeric value assigned to the character *chr* as float. If no "
74- "such value is defined, *default* is returned, or, if not "
75- "given, :exc:`ValueError` is raised."
121+ "such value is defined, *default* is returned, or, if not given, :exc:"
122+ "`ValueError` is raised::"
123+ msgstr ""
124+
125+ #: ../../library/unicodedata.rst:93
126+ msgid ""
127+ ">>> unicodedata.numeric('½')\n"
128+ "0.5"
76129msgstr ""
77130
78- #: ../../library/unicodedata.rst:68
79- msgid "Returns the general category assigned to the character *chr* as string."
131+ #: ../../library/unicodedata.rst:99
132+ msgid ""
133+ "Returns the general category assigned to the character *chr* as string. "
134+ "General category names consist of two letters. See the `General Category "
135+ "Values section of the Unicode Character Database documentation <https://www."
136+ "unicode.org/reports/tr44/tr44-30.html#General_Category_Values>`_ for a list "
137+ "of category codes. For example::"
80138msgstr ""
81139
82- #: ../../library/unicodedata.rst:74
140+ #: ../../library/unicodedata.rst:105
141+ msgid ""
142+ ">>> unicodedata.category('A') # 'L'etter, 'u'ppercase\n"
143+ "'Lu'"
144+ msgstr ""
145+
146+ #: ../../library/unicodedata.rst:111
83147msgid ""
84148"Returns the bidirectional class assigned to the character *chr* as string. "
85- "If no such value is defined, an empty string is returned."
149+ "If no such value is defined, an empty string is returned. See the "
150+ "`Bidirectional Class Values section of the Unicode Character Database "
151+ "<https://www.unicode.org/reports/tr44/tr44-30.html#Bidi_Class_Values>`_ "
152+ "documentation for a list of bidirectional codes. For example::"
86153msgstr ""
87154
88- #: ../../library/unicodedata.rst:80
155+ #: ../../library/unicodedata.rst:117
156+ msgid ""
157+ ">>> unicodedata.bidirectional('\\ N{ARABIC-INDIC DIGIT SEVEN}') # 'A'rabic, "
158+ "'N'umber\n"
159+ "'AN'"
160+ msgstr ""
161+
162+ #: ../../library/unicodedata.rst:123
89163msgid ""
90164"Returns the canonical combining class assigned to the character *chr* as "
91- "integer. Returns ``0`` if no combining class is defined."
165+ "integer. Returns ``0`` if no combining class is defined. See the `Canonical "
166+ "Combining Class Values section of the Unicode Character Database <www."
167+ "unicode.org/reports/tr44/tr44-30.html#Canonical_Combining_Class_Values>`_ "
168+ "for more information."
92169msgstr ""
93170
94- #: ../../library/unicodedata.rst:86
95- msgid "Returns the east asian width assigned to the character *chr* as string."
171+ #: ../../library/unicodedata.rst:132
172+ msgid ""
173+ "Returns the east asian width assigned to the character *chr* as string. For "
174+ "a list of widths and or more information, see the `Unicode Standard Annex "
175+ "#11 <https://www.unicode.org/reports/tr11/tr11-41.html>`_."
96176msgstr ""
97177
98- #: ../../library/unicodedata.rst:92
178+ #: ../../library/unicodedata.rst:139
99179msgid ""
100180"Returns the mirrored property assigned to the character *chr* as integer. "
101181"Returns ``1`` if the character has been identified as a \" mirrored\" "
102- "character in bidirectional text, ``0`` otherwise."
182+ "character in bidirectional text, ``0`` otherwise. For example:: "
103183msgstr ""
104184
105- #: ../../library/unicodedata.rst:99
185+ #: ../../library/unicodedata.rst:143
186+ msgid ""
187+ ">>> unicodedata.mirrored('>')\n"
188+ "1"
189+ msgstr ""
190+
191+ #: ../../library/unicodedata.rst:149
106192msgid ""
107193"Returns the character decomposition mapping assigned to the character *chr* "
108- "as string. An empty string is returned in case no such mapping is defined."
194+ "as string. An empty string is returned in case no such mapping is defined. "
195+ "For example::"
196+ msgstr ""
197+
198+ #: ../../library/unicodedata.rst:153
199+ msgid ""
200+ ">>> unicodedata.decomposition('Ã')\n"
201+ "'0041 0303'"
109202msgstr ""
110203
111- #: ../../library/unicodedata.rst:106
204+ #: ../../library/unicodedata.rst:159
112205msgid ""
113206"Return the normal form *form* for the Unicode string *unistr*. Valid values "
114207"for *form* are 'NFC', 'NFKC', 'NFD', and 'NFKD'."
115208msgstr ""
116209
117- #: ../../library/unicodedata.rst:109
210+ #: ../../library/unicodedata.rst:162
118211msgid ""
119212"The Unicode standard defines various normalization forms of a Unicode "
120213"string, based on the definition of canonical equivalence and compatibility "
@@ -124,7 +217,7 @@ msgid ""
124217"(COMBINING CEDILLA)."
125218msgstr ""
126219
127- #: ../../library/unicodedata.rst:115
220+ #: ../../library/unicodedata.rst:168
128221msgid ""
129222"For each character, there are two normal forms: normal form C and normal "
130223"form D. Normal form D (NFD) is also known as canonical decomposition, and "
@@ -133,65 +226,61 @@ msgid ""
133226"characters again."
134227msgstr ""
135228
136- #: ../../library/unicodedata.rst:120
229+ #: ../../library/unicodedata.rst:173
137230msgid ""
138231"In addition to these two forms, there are two additional normal forms based "
139232"on compatibility equivalence. In Unicode, certain characters are supported "
140233"which normally would be unified with other characters. For example, U+2160 "
141234"(ROMAN NUMERAL ONE) is really the same thing as U+0049 (LATIN CAPITAL LETTER "
142235"I). However, it is supported in Unicode for compatibility with existing "
143- "character sets (e.g. gb2312)."
236+ "character sets (for example, gb2312)."
144237msgstr ""
145238
146- #: ../../library/unicodedata.rst:127
239+ #: ../../library/unicodedata.rst:180
147240msgid ""
148- "The normal form KD (NFKD) will apply the compatibility decomposition, i.e. "
149- "replace all compatibility characters with their equivalents. The normal form "
150- "KC (NFKC) first applies the compatibility decomposition, followed by the "
151- "canonical composition."
241+ "The normal form KD (NFKD) will apply the compatibility decomposition, that "
242+ "is, replace all compatibility characters with their equivalents. The normal "
243+ "form KC (NFKC) first applies the compatibility decomposition, followed by "
244+ "the canonical composition."
152245msgstr ""
153246
154- #: ../../library/unicodedata.rst:132
247+ #: ../../library/unicodedata.rst:185
155248msgid ""
156249"Even if two unicode strings are normalized and look the same to a human "
157250"reader, if one has combining characters and the other doesn't, they may not "
158251"compare equal."
159252msgstr ""
160253
161- #: ../../library/unicodedata.rst:138
254+ #: ../../library/unicodedata.rst:192
162255msgid ""
163256"Return whether the Unicode string *unistr* is in the normal form *form*. "
164257"Valid values for *form* are 'NFC', 'NFKC', 'NFD', and 'NFKD'."
165258msgstr ""
166259
167- #: ../../library/unicodedata.rst:144
260+ #: ../../library/unicodedata.rst:198
168261msgid "In addition, the module exposes the following constant:"
169262msgstr ""
170263
171- #: ../../library/unicodedata.rst:148
264+ #: ../../library/unicodedata.rst:202
172265msgid "The version of the Unicode database used in this module."
173266msgstr ""
174267
175- #: ../../library/unicodedata.rst:153
268+ #: ../../library/unicodedata.rst:207
176269msgid ""
177270"This is an object that has the same methods as the entire module, but uses "
178271"the Unicode database version 3.2 instead, for applications that require this "
179272"specific version of the Unicode database (such as IDNA)."
180273msgstr ""
181274
182- #: ../../library/unicodedata.rst:157
183- msgid "Examples:"
184- msgstr "範例:"
185-
186- #: ../../library/unicodedata.rst:177
275+ #: ../../library/unicodedata.rst:213
187276msgid "Footnotes"
188277msgstr "註解"
189278
190- #: ../../library/unicodedata.rst:178
279+ #: ../../library/unicodedata.rst:214
191280msgid "https://www.unicode.org/Public/15.1.0/ucd/NameAliases.txt"
192281msgstr "https://www.unicode.org/Public/15.1.0/ucd/NameAliases.txt"
193282
194- #: ../../library/unicodedata.rst:180
283+ #: ../../library/unicodedata.rst:216
195284msgid "https://www.unicode.org/Public/15.1.0/ucd/NamedSequences.txt"
196285msgstr "https://www.unicode.org/Public/15.1.0/ucd/NamedSequences.txt"
197286
@@ -206,3 +295,6 @@ msgstr "character(字元)"
206295#: ../../library/unicodedata.rst:11
207296msgid "database"
208297msgstr "database(資料庫)"
298+
299+ #~ msgid "Examples:"
300+ #~ msgstr "範例:"
0 commit comments