-
-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy pathcodec.po
200 lines (172 loc) · 8.44 KB
/
codec.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# Copyright (C) 2001-2023, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Matt Wang <[email protected]>, 2023
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-29 00:03+0000\n"
"PO-Revision-Date: 2023-07-24 17:51+0000\n"
"Last-Translator: Matt Wang <[email protected]>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
"Language: zh_TW\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../c-api/codec.rst:4
msgid "Codec registry and support functions"
msgstr "編解碼器註冊表和支援函式"
#: ../../c-api/codec.rst:8
msgid "Register a new codec search function."
msgstr "註冊一個新的編解碼器搜尋函式。"
#: ../../c-api/codec.rst:10
msgid ""
"As side effect, this tries to load the :mod:`!encodings` package, if not yet "
"done, to make sure that it is always first in the list of search functions."
msgstr ""
"作為副作用 (side effect),這會嘗試載入 :mod:`!encodings`\\ (如果尚未完成),"
"以確保它始終位於搜尋函式列表中的第一個。"
#: ../../c-api/codec.rst:15
msgid ""
"Unregister a codec search function and clear the registry's cache. If the "
"search function is not registered, do nothing. Return 0 on success. Raise an "
"exception and return -1 on error."
msgstr ""
"取消註冊編解碼器搜尋函式並清除註冊表 (registry) 的快取。如果搜尋函式並未被註"
"冊,則不執行任何操作。成功回傳 0,發生錯誤時會引發例外並回傳 -1。"
#: ../../c-api/codec.rst:23
msgid ""
"Return ``1`` or ``0`` depending on whether there is a registered codec for "
"the given *encoding*. This function always succeeds."
msgstr ""
"回傳 ``1`` 或 ``0``,具體取決於是否有給定 *encoding* 的已註冊編解碼器。這個函"
"式總會成功。"
#: ../../c-api/codec.rst:28
msgid "Generic codec based encoding API."
msgstr "基於泛用編解碼器的編碼 API。"
#: ../../c-api/codec.rst:30
msgid ""
"*object* is passed through the encoder function found for the given "
"*encoding* using the error handling method defined by *errors*. *errors* "
"may be ``NULL`` to use the default method defined for the codec. Raises a :"
"exc:`LookupError` if no encoder can be found."
msgstr ""
"*object* 被傳遞給以給定 *encoding* 所查找到的編碼器函式,並使用以 *errors* 定"
"義的錯誤處理方法。*errors* 可以設為 ``NULL`` 來使用編解碼器定義的預設方法。如"
"果找不到編碼器,則引發 :exc:`LookupError`。"
#: ../../c-api/codec.rst:37
msgid "Generic codec based decoding API."
msgstr "基於泛用編解碼器的解碼 API。"
#: ../../c-api/codec.rst:39
msgid ""
"*object* is passed through the decoder function found for the given "
"*encoding* using the error handling method defined by *errors*. *errors* "
"may be ``NULL`` to use the default method defined for the codec. Raises a :"
"exc:`LookupError` if no encoder can be found."
msgstr ""
"*object* 被傳遞給以給定 *encoding* 所查找到的解碼器函式,並使用以 *errors* 定"
"義的錯誤處理方法。*errors* 可以設為 ``NULL`` 來使用編解碼器定義的預設方法。如"
"果找不到編碼器,則引發 :exc:`LookupError`。"
#: ../../c-api/codec.rst:46
msgid "Codec lookup API"
msgstr "編解碼器查找 API"
#: ../../c-api/codec.rst:48
msgid ""
"In the following functions, the *encoding* string is looked up converted to "
"all lower-case characters, which makes encodings looked up through this "
"mechanism effectively case-insensitive. If no codec is found, a :exc:"
"`KeyError` is set and ``NULL`` returned."
msgstr ""
"在以下函式中,查找的 *encoding* 字串的所有字元將轉換為小寫,這使得透過此機制"
"查找的編碼可以不區分大小寫而更有效率。如果未找到編解碼器,則會設定 :exc:"
"`KeyError` 並回傳 ``NULL``。"
#: ../../c-api/codec.rst:55
msgid "Get an encoder function for the given *encoding*."
msgstr "取得給定 *encoding* 的編碼器函式。"
#: ../../c-api/codec.rst:59
msgid "Get a decoder function for the given *encoding*."
msgstr "取得給定 *encoding* 的解碼器函式。"
#: ../../c-api/codec.rst:63
msgid ""
"Get an :class:`~codecs.IncrementalEncoder` object for the given *encoding*."
msgstr "取得給定 *encoding* 的 :class:`~codecs.IncrementalEncoder` 物件。"
#: ../../c-api/codec.rst:67
msgid ""
"Get an :class:`~codecs.IncrementalDecoder` object for the given *encoding*."
msgstr "取得給定 *encoding* 的 :class:`~codecs.IncrementalDecoder` 物件。"
#: ../../c-api/codec.rst:71
msgid ""
"Get a :class:`~codecs.StreamReader` factory function for the given "
"*encoding*."
msgstr "取得給定 *encoding* 的 :class:`~codecs.StreamReader` 工廠函式。"
#: ../../c-api/codec.rst:75
msgid ""
"Get a :class:`~codecs.StreamWriter` factory function for the given "
"*encoding*."
msgstr "取得給定 *encoding* 的 :class:`~codecs.StreamWriter` 工廠函式。"
#: ../../c-api/codec.rst:79
msgid "Registry API for Unicode encoding error handlers"
msgstr "用於 Unicode 編碼錯誤處理程式的註冊 API"
#: ../../c-api/codec.rst:83
msgid ""
"Register the error handling callback function *error* under the given "
"*name*. This callback function will be called by a codec when it encounters "
"unencodable characters/undecodable bytes and *name* is specified as the "
"error parameter in the call to the encode/decode function."
msgstr ""
"在給定的 *name* 下註冊錯誤處理回呼 (callback) 函式 *error*。當編解碼器遇到無"
"法編碼的字元/無法解碼的位元組並且 *name* 被指定為呼叫編碼/解碼函式時的錯誤參"
"數時,將呼叫此回呼函式。"
#: ../../c-api/codec.rst:88
msgid ""
"The callback gets a single argument, an instance of :exc:"
"`UnicodeEncodeError`, :exc:`UnicodeDecodeError` or :exc:"
"`UnicodeTranslateError` that holds information about the problematic "
"sequence of characters or bytes and their offset in the original string "
"(see :ref:`unicodeexceptions` for functions to extract this information). "
"The callback must either raise the given exception, or return a two-item "
"tuple containing the replacement for the problematic sequence, and an "
"integer giving the offset in the original string at which encoding/decoding "
"should be resumed."
msgstr ""
"回呼取得單個引數,即 :exc:`UnicodeEncodeError`、:exc:`UnicodeDecodeError` "
"或 :exc:`UnicodeTranslateError` 的實例,其中包含關於有問題的字元或位元組序列"
"及其在原始字串中偏移量的資訊(有關取得此資訊的函式,請參閱 :ref:"
"`unicodeexceptions`)。回呼必須引發給定的例外,或者回傳一個包含有問題序列的替"
"換的二元組 (two-item tuple),以及一個代表原始字串中應該被恢復的編碼/解碼偏移"
"量的整數。"
#: ../../c-api/codec.rst:98
msgid "Return ``0`` on success, ``-1`` on error."
msgstr "成功時回傳 ``0``,錯誤時回傳 ``-1``。"
#: ../../c-api/codec.rst:102
msgid ""
"Lookup the error handling callback function registered under *name*. As a "
"special case ``NULL`` can be passed, in which case the error handling "
"callback for \"strict\" will be returned."
msgstr ""
"查找 *name* 下已註冊的錯誤處理回呼函式。作為一種特殊情況,可以傳遞 ``NULL``,"
"在這種情況下,將回傳 \"strict\" 的錯誤處理回呼。"
#: ../../c-api/codec.rst:108
msgid "Raise *exc* as an exception."
msgstr "引發 *exc* 作為例外。"
#: ../../c-api/codec.rst:112
msgid "Ignore the unicode error, skipping the faulty input."
msgstr "忽略 unicode 錯誤,跳過錯誤的輸入。"
#: ../../c-api/codec.rst:116
msgid "Replace the unicode encode error with ``?`` or ``U+FFFD``."
msgstr "將 unicode 編碼錯誤替換為 ``?`` 或 ``U+FFFD``。"
#: ../../c-api/codec.rst:120
msgid "Replace the unicode encode error with XML character references."
msgstr "將 unicode 編碼錯誤替換為 XML 字元參照。"
#: ../../c-api/codec.rst:124
msgid ""
"Replace the unicode encode error with backslash escapes (``\\x``, ``\\u`` "
"and ``\\U``)."
msgstr "將 unicode 編碼錯誤替換為反斜線跳脫(``\\x``、``\\u`` 和 ``\\U``)。"
#: ../../c-api/codec.rst:129
msgid "Replace the unicode encode error with ``\\N{...}`` escapes."
msgstr "將 unicode 編碼錯誤替換為 ``\\N{...}`` 跳脫。"