-
-
Notifications
You must be signed in to change notification settings - Fork 224
Expand file tree
/
Copy pathunicode.po
More file actions
2384 lines (1970 loc) · 77.2 KB
/
unicode.po
File metadata and controls
2384 lines (1970 loc) · 77.2 KB
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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Leon H., 2017
# Liang-Bo Wang <me@liang2.tw>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-10 00:23+0000\n"
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\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/unicode.rst:6
msgid "Unicode Objects and Codecs"
msgstr "Unicode 物件與編解碼器"
#: ../../c-api/unicode.rst:12
msgid "Unicode Objects"
msgstr "Unicode 物件"
#: ../../c-api/unicode.rst:14
msgid ""
"Since the implementation of :pep:`393` in Python 3.3, Unicode objects "
"internally use a variety of representations, in order to allow handling the "
"complete range of Unicode characters while staying memory efficient. There "
"are special cases for strings where all code points are below 128, 256, or "
"65536; otherwise, code points must be below 1114112 (which is the full "
"Unicode range)."
msgstr ""
#: ../../c-api/unicode.rst:20
msgid ""
"UTF-8 representation is created on demand and cached in the Unicode object."
msgstr "UTF-8 表示法會在需要時建立並快取在 Unicode 物件中。"
#: ../../c-api/unicode.rst:23
msgid ""
"The :c:type:`Py_UNICODE` representation has been removed since Python 3.12 "
"with deprecated APIs. See :pep:`623` for more information."
msgstr ""
"自 Python 3.12 起,已移除 :c:type:`Py_UNICODE` 表示法,並標示為已棄用的 API。"
"更多資訊請參閱 :pep:`623`。"
#: ../../c-api/unicode.rst:29
msgid "Unicode Type"
msgstr "Unicode 型別"
#: ../../c-api/unicode.rst:31
msgid ""
"These are the basic Unicode object types used for the Unicode implementation "
"in Python:"
msgstr "這些是 Python 中用於 Unicode 實作的基本 Unicode 物件型別:"
#: ../../c-api/unicode.rst:36
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python Unicode type. "
"It is exposed to Python code as :py:class:`str`."
msgstr ""
#: ../../c-api/unicode.rst:42
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python Unicode "
"iterator type. It is used to iterate over Unicode string objects."
msgstr ""
#: ../../c-api/unicode.rst:50
msgid ""
"These types are typedefs for unsigned integer types wide enough to contain "
"characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with "
"single Unicode characters, use :c:type:`Py_UCS4`."
msgstr ""
#: ../../c-api/unicode.rst:61
msgid ""
"These subtypes of :c:type:`PyObject` represent a Python Unicode object. In "
"almost all cases, they shouldn't be used directly, since all API functions "
"that deal with Unicode objects take and return :c:type:`PyObject` pointers."
msgstr ""
#: ../../c-api/unicode.rst:68
msgid ""
"The structure of a particular object can be determined using the following "
"macros. The macros cannot fail; their behavior is undefined if their "
"argument is not a Python Unicode object."
msgstr ""
#: ../../c-api/unicode.rst:77
msgid "True if *o* uses the :c:struct:`PyCompactUnicodeObject` structure."
msgstr ""
#: ../../c-api/unicode.rst:84
msgid "True if *o* uses the :c:struct:`PyASCIIObject` structure."
msgstr ""
#: ../../c-api/unicode.rst:89
msgid ""
"The following APIs are C macros and static inlined functions for fast checks "
"and access to internal read-only data of Unicode objects:"
msgstr ""
#: ../../c-api/unicode.rst:94
msgid ""
"Return true if the object *obj* is a Unicode object or an instance of a "
"Unicode subtype. This function always succeeds."
msgstr ""
#: ../../c-api/unicode.rst:100
msgid ""
"Return true if the object *obj* is a Unicode object, but not an instance of "
"a subtype. This function always succeeds."
msgstr ""
#: ../../c-api/unicode.rst:106
msgid ""
"Return the length of the Unicode string, in code points. *unicode* has to "
"be a Unicode object in the \"canonical\" representation (not checked)."
msgstr ""
#: ../../c-api/unicode.rst:116
msgid ""
"Return a pointer to the canonical representation cast to UCS1, UCS2 or UCS4 "
"integer types for direct character access. No checks are performed if the "
"canonical representation has the correct character size; use :c:func:"
"`PyUnicode_KIND` to select the right function."
msgstr ""
#: ../../c-api/unicode.rst:128
msgid "Return values of the :c:func:`PyUnicode_KIND` macro."
msgstr ""
#: ../../c-api/unicode.rst:132
msgid "``PyUnicode_WCHAR_KIND`` has been removed."
msgstr "``PyUnicode_WCHAR_KIND`` 已被移除。"
#: ../../c-api/unicode.rst:138
msgid ""
"Return one of the PyUnicode kind constants (see above) that indicate how "
"many bytes per character this Unicode object uses to store its data. "
"*unicode* has to be a Unicode object in the \"canonical\" representation "
"(not checked)."
msgstr ""
#: ../../c-api/unicode.rst:147
msgid ""
"Return a void pointer to the raw Unicode buffer. *unicode* has to be a "
"Unicode object in the \"canonical\" representation (not checked)."
msgstr ""
#: ../../c-api/unicode.rst:156
msgid ""
"Write the code point *value* to the given zero-based *index* in a string."
msgstr ""
#: ../../c-api/unicode.rst:158
msgid ""
"The *kind* value and *data* pointer must have been obtained from a string "
"using :c:func:`PyUnicode_KIND` and :c:func:`PyUnicode_DATA` respectively. "
"You must hold a reference to that string while calling :c:func:`!"
"PyUnicode_WRITE`. All requirements of :c:func:`PyUnicode_WriteChar` also "
"apply."
msgstr ""
#: ../../c-api/unicode.rst:164
msgid ""
"The function performs no checks for any of its requirements, and is intended "
"for usage in loops."
msgstr ""
#: ../../c-api/unicode.rst:173
msgid ""
"Read a code point from a canonical representation *data* (as obtained with :"
"c:func:`PyUnicode_DATA`). No checks or ready calls are performed."
msgstr ""
#: ../../c-api/unicode.rst:181
msgid ""
"Read a character from a Unicode object *unicode*, which must be in the "
"\"canonical\" representation. This is less efficient than :c:func:"
"`PyUnicode_READ` if you do multiple consecutive reads."
msgstr ""
#: ../../c-api/unicode.rst:190
msgid ""
"Return the maximum code point that is suitable for creating another string "
"based on *unicode*, which must be in the \"canonical\" representation. This "
"is always an approximation but more efficient than iterating over the string."
msgstr ""
#: ../../c-api/unicode.rst:199
msgid ""
"Return ``1`` if the string is a valid identifier according to the language "
"definition, section :ref:`identifiers`. Return ``0`` otherwise."
msgstr ""
#: ../../c-api/unicode.rst:202
msgid ""
"The function does not call :c:func:`Py_FatalError` anymore if the string is "
"not ready."
msgstr ""
#: ../../c-api/unicode.rst:209
msgid ""
"Return true if the string only contains ASCII characters. Equivalent to :py:"
"meth:`str.isascii`."
msgstr ""
#: ../../c-api/unicode.rst:216
msgid "Unicode Character Properties"
msgstr ""
#: ../../c-api/unicode.rst:218
msgid ""
"Unicode provides many different character properties. The most often needed "
"ones are available through these macros which are mapped to C functions "
"depending on the Python configuration."
msgstr ""
#: ../../c-api/unicode.rst:225
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a whitespace character."
msgstr "根據 *ch* 是否為空白字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:230
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a lowercase character."
msgstr "根據 *ch* 是否為小寫字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:235
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an uppercase character."
msgstr "根據 *ch* 是否為大寫字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:240
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a titlecase character."
msgstr "根據 *ch* 是否為首字大寫字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:245
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a linebreak character."
msgstr "根據 *ch* 是否為換行字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:250
msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character."
msgstr "根據 *ch* 是否為十進位字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:255
msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character."
msgstr "根據 *ch* 是否為數字 (digit) 字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:260
msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character."
msgstr "根據 *ch* 是否為數值 (numeric) 字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:265
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character."
msgstr "根據 *ch* 是否為字母字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:270
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character."
msgstr "根據 *ch* 是否為字母數字 (alphanumeric) 字元來回傳 ``1`` 或 ``0``。"
#: ../../c-api/unicode.rst:275
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a printable character, in "
"the sense of :meth:`str.isprintable`."
msgstr ""
"根據 *ch* 是否為可列印字元(如 :meth:`str.isprintable` 所定義)來回傳 ``1`` "
"或 ``0``。"
#: ../../c-api/unicode.rst:279
msgid "These APIs can be used for fast direct character conversions:"
msgstr "這些 API 可用於快速直接字元轉換:"
#: ../../c-api/unicode.rst:284
msgid "Return the character *ch* converted to lower case."
msgstr "回傳轉換為小寫的 *ch* 字元。"
#: ../../c-api/unicode.rst:289
msgid "Return the character *ch* converted to upper case."
msgstr "回傳轉換為大寫的 *ch* 字元。"
#: ../../c-api/unicode.rst:294
msgid "Return the character *ch* converted to title case."
msgstr "回傳轉換為首字大寫的 *ch* 字元。"
#: ../../c-api/unicode.rst:299
msgid ""
"Return the character *ch* converted to a decimal positive integer. Return "
"``-1`` if this is not possible. This function does not raise exceptions."
msgstr ""
"回傳轉換為十進位正整數的 *ch* 字元,若無法轉換則回傳 ``-1``。此函式不會引發例"
"外。"
#: ../../c-api/unicode.rst:305
msgid ""
"Return the character *ch* converted to a single digit integer. Return ``-1`` "
"if this is not possible. This function does not raise exceptions."
msgstr ""
"回傳轉換為單一數字整數的 *ch* 字元,若無法轉換則回傳 ``-1``。此函式不會引發例"
"外。"
#: ../../c-api/unicode.rst:311
msgid ""
"Return the character *ch* converted to a double. Return ``-1.0`` if this is "
"not possible. This function does not raise exceptions."
msgstr ""
"回傳轉換為雙精度浮點數 (double) 的 *ch* 字元,若無法轉換則回傳 ``-1.0``。此函"
"式不會引發例外。"
#: ../../c-api/unicode.rst:315
msgid "These APIs can be used to work with surrogates:"
msgstr "這些 API 可用於處理代理字元:"
#: ../../c-api/unicode.rst:319
msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)."
msgstr "檢查 *ch* 是否為代理字元 (surrogate, ``0xD800 <= ch <= 0xDFFF``)。"
#: ../../c-api/unicode.rst:323
msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)."
msgstr ""
"檢查 *ch* 是否為高代理字元 (high surrogate, ``0xD800 <= ch <= 0xDBFF``)。"
#: ../../c-api/unicode.rst:327
msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)."
msgstr ""
"檢查 *ch* 是否為低代理字元 (low surrogate, ``0xDC00 <= ch <= 0xDFFF``)。"
#: ../../c-api/unicode.rst:331
msgid ""
"Return the high UTF-16 surrogate (``0xD800`` to ``0xDBFF``) for a Unicode "
"code point in the range ``[0x10000; 0x10FFFF]``."
msgstr ""
#: ../../c-api/unicode.rst:336
msgid ""
"Return the low UTF-16 surrogate (``0xDC00`` to ``0xDFFF``) for a Unicode "
"code point in the range ``[0x10000; 0x10FFFF]``."
msgstr ""
#: ../../c-api/unicode.rst:341
msgid ""
"Join two surrogate code points and return a single :c:type:`Py_UCS4` value. "
"*high* and *low* are respectively the leading and trailing surrogates in a "
"surrogate pair. *high* must be in the range ``[0xD800; 0xDBFF]`` and *low* "
"must be in the range ``[0xDC00; 0xDFFF]``."
msgstr ""
#: ../../c-api/unicode.rst:348
msgid "Creating and accessing Unicode strings"
msgstr ""
#: ../../c-api/unicode.rst:350
msgid ""
"To create Unicode objects and access their basic sequence properties, use "
"these APIs:"
msgstr ""
#: ../../c-api/unicode.rst:355
msgid ""
"Create a new Unicode object. *maxchar* should be the true maximum code "
"point to be placed in the string. As an approximation, it can be rounded up "
"to the nearest value in the sequence 127, 255, 65535, 1114111."
msgstr ""
#: ../../c-api/unicode.rst:359
msgid "On error, set an exception and return ``NULL``."
msgstr ""
#: ../../c-api/unicode.rst:361
msgid ""
"After creation, the string can be filled by :c:func:`PyUnicode_WriteChar`, :"
"c:func:`PyUnicode_CopyCharacters`, :c:func:`PyUnicode_Fill`, :c:func:"
"`PyUnicode_WRITE` or similar. Since strings are supposed to be immutable, "
"take care to not “use” the result while it is being modified. In particular, "
"before it's filled with its final contents, a string:"
msgstr ""
#: ../../c-api/unicode.rst:368
msgid "must not be hashed,"
msgstr ""
#: ../../c-api/unicode.rst:369
msgid ""
"must not be :c:func:`converted to UTF-8 <PyUnicode_AsUTF8AndSize>`, or "
"another non-\"canonical\" representation,"
msgstr ""
#: ../../c-api/unicode.rst:371
msgid "must not have its reference count changed,"
msgstr ""
#: ../../c-api/unicode.rst:372
msgid "must not be shared with code that might do one of the above."
msgstr ""
#: ../../c-api/unicode.rst:374
msgid ""
"This list is not exhaustive. Avoiding these uses is your responsibility; "
"Python does not always check these requirements."
msgstr ""
#: ../../c-api/unicode.rst:377
msgid ""
"To avoid accidentally exposing a partially-written string object, prefer "
"using the :c:type:`PyUnicodeWriter` API, or one of the ``PyUnicode_From*`` "
"functions below."
msgstr ""
#: ../../c-api/unicode.rst:388
msgid ""
"Create a new Unicode object with the given *kind* (possible values are :c:"
"macro:`PyUnicode_1BYTE_KIND` etc., as returned by :c:func:"
"`PyUnicode_KIND`). The *buffer* must point to an array of *size* units of "
"1, 2 or 4 bytes per character, as given by the kind."
msgstr ""
#: ../../c-api/unicode.rst:393
msgid ""
"If necessary, the input *buffer* is copied and transformed into the "
"canonical representation. For example, if the *buffer* is a UCS4 string (:c:"
"macro:`PyUnicode_4BYTE_KIND`) and it consists only of codepoints in the UCS1 "
"range, it will be transformed into UCS1 (:c:macro:`PyUnicode_1BYTE_KIND`)."
msgstr ""
#: ../../c-api/unicode.rst:404
msgid ""
"Create a Unicode object from the char buffer *str*. The bytes will be "
"interpreted as being UTF-8 encoded. The buffer is copied into the new "
"object. The return value might be a shared object, i.e. modification of the "
"data is not allowed."
msgstr ""
#: ../../c-api/unicode.rst:410
msgid "This function raises :exc:`SystemError` when:"
msgstr "此函式在以下情況下會引發 :exc:`SystemError`:"
#: ../../c-api/unicode.rst:412
msgid "*size* < 0,"
msgstr "*size* < 0,"
#: ../../c-api/unicode.rst:413
msgid "*str* is ``NULL`` and *size* > 0"
msgstr "*str* 為 ``NULL`` 且 *size* > 0"
#: ../../c-api/unicode.rst:415
msgid "*str* == ``NULL`` with *size* > 0 is not allowed anymore."
msgstr "*str* == ``NULL`` 且 *size* > 0 不再被允許。"
#: ../../c-api/unicode.rst:421
msgid ""
"Create a Unicode object from a UTF-8 encoded null-terminated char buffer "
"*str*."
msgstr ""
#: ../../c-api/unicode.rst:427
msgid ""
"Take a C :c:func:`printf`\\ -style *format* string and a variable number of "
"arguments, calculate the size of the resulting Python Unicode string and "
"return a string with the values formatted into it. The variable arguments "
"must be C types and must correspond exactly to the format characters in the "
"*format* ASCII-encoded string."
msgstr ""
#: ../../c-api/unicode.rst:433
msgid ""
"A conversion specifier contains two or more characters and has the following "
"components, which must occur in this order:"
msgstr ""
#: ../../c-api/unicode.rst:436
msgid "The ``'%'`` character, which marks the start of the specifier."
msgstr ""
#: ../../c-api/unicode.rst:438
msgid ""
"Conversion flags (optional), which affect the result of some conversion "
"types."
msgstr ""
#: ../../c-api/unicode.rst:441
msgid ""
"Minimum field width (optional). If specified as an ``'*'`` (asterisk), the "
"actual width is given in the next argument, which must be of type :c:expr:"
"`int`, and the object to convert comes after the minimum field width and "
"optional precision."
msgstr ""
#: ../../c-api/unicode.rst:446
msgid ""
"Precision (optional), given as a ``'.'`` (dot) followed by the precision. If "
"specified as ``'*'`` (an asterisk), the actual precision is given in the "
"next argument, which must be of type :c:expr:`int`, and the value to convert "
"comes after the precision."
msgstr ""
#: ../../c-api/unicode.rst:451
msgid "Length modifier (optional)."
msgstr ""
#: ../../c-api/unicode.rst:453
msgid "Conversion type."
msgstr ""
#: ../../c-api/unicode.rst:455
msgid "The conversion flag characters are:"
msgstr ""
#: ../../c-api/unicode.rst:460
msgid "Flag"
msgstr "旗標"
#: ../../c-api/unicode.rst:460
msgid "Meaning"
msgstr "含義"
#: ../../c-api/unicode.rst:462
msgid "``0``"
msgstr "``0``"
#: ../../c-api/unicode.rst:462
msgid "The conversion will be zero padded for numeric values."
msgstr ""
#: ../../c-api/unicode.rst:464
msgid "``-``"
msgstr "``-``"
#: ../../c-api/unicode.rst:464
msgid ""
"The converted value is left adjusted (overrides the ``0`` flag if both are "
"given)."
msgstr ""
#: ../../c-api/unicode.rst:468
msgid ""
"The length modifiers for following integer conversions (``d``, ``i``, ``o``, "
"``u``, ``x``, or ``X``) specify the type of the argument (:c:expr:`int` by "
"default):"
msgstr ""
#: ../../c-api/unicode.rst:475
msgid "Modifier"
msgstr ""
#: ../../c-api/unicode.rst:475
msgid "Types"
msgstr ""
#: ../../c-api/unicode.rst:477
msgid "``l``"
msgstr "``l``"
#: ../../c-api/unicode.rst:477
msgid ":c:expr:`long` or :c:expr:`unsigned long`"
msgstr ":c:expr:`long` 或 :c:expr:`unsigned long`"
#: ../../c-api/unicode.rst:479
msgid "``ll``"
msgstr "``ll``"
#: ../../c-api/unicode.rst:479
msgid ":c:expr:`long long` or :c:expr:`unsigned long long`"
msgstr ":c:expr:`long long` 或 :c:expr:`unsigned long long`"
#: ../../c-api/unicode.rst:481
msgid "``j``"
msgstr "``j``"
#: ../../c-api/unicode.rst:481
msgid ":c:type:`intmax_t` or :c:type:`uintmax_t`"
msgstr ":c:type:`intmax_t` 或 :c:type:`uintmax_t`"
#: ../../c-api/unicode.rst:483
msgid "``z``"
msgstr "``z``"
#: ../../c-api/unicode.rst:483
msgid ":c:type:`size_t` or :c:type:`ssize_t`"
msgstr ":c:type:`size_t` 或 :c:type:`ssize_t`"
#: ../../c-api/unicode.rst:485
msgid "``t``"
msgstr "``t``"
#: ../../c-api/unicode.rst:485
msgid ":c:type:`ptrdiff_t`"
msgstr ":c:type:`ptrdiff_t`"
#: ../../c-api/unicode.rst:488
msgid ""
"The length modifier ``l`` for following conversions ``s`` or ``V`` specify "
"that the type of the argument is :c:expr:`const wchar_t*`."
msgstr ""
#: ../../c-api/unicode.rst:491
msgid "The conversion specifiers are:"
msgstr ""
#: ../../c-api/unicode.rst:497
msgid "Conversion Specifier"
msgstr ""
#: ../../c-api/unicode.rst:498
msgid "Type"
msgstr ""
#: ../../c-api/unicode.rst:499
msgid "Comment"
msgstr ""
#: ../../c-api/unicode.rst:501
msgid "``%``"
msgstr "``%``"
#: ../../c-api/unicode.rst:502
msgid "*n/a*"
msgstr "*n/a*"
#: ../../c-api/unicode.rst:503
msgid "The literal ``%`` character."
msgstr "字面 ``%`` 字元。"
#: ../../c-api/unicode.rst:505
msgid "``d``, ``i``"
msgstr "``d``, ``i``"
#: ../../c-api/unicode.rst:506 ../../c-api/unicode.rst:510
#: ../../c-api/unicode.rst:514 ../../c-api/unicode.rst:518
#: ../../c-api/unicode.rst:522
msgid "Specified by the length modifier"
msgstr ""
#: ../../c-api/unicode.rst:507
msgid "The decimal representation of a signed C integer."
msgstr "一個有符號 C 整數的十進位表示法。"
#: ../../c-api/unicode.rst:509
msgid "``u``"
msgstr "``u``"
#: ../../c-api/unicode.rst:511
msgid "The decimal representation of an unsigned C integer."
msgstr "一個無符號 C 整數的十進位表示法。"
#: ../../c-api/unicode.rst:513
msgid "``o``"
msgstr "``o``"
#: ../../c-api/unicode.rst:515
msgid "The octal representation of an unsigned C integer."
msgstr "一個無符號 C 整數的八進位表示法。"
#: ../../c-api/unicode.rst:517
msgid "``x``"
msgstr "``x``"
#: ../../c-api/unicode.rst:519
msgid "The hexadecimal representation of an unsigned C integer (lowercase)."
msgstr "一個無符號 C 整數的十六進位表示法(小寫)。"
#: ../../c-api/unicode.rst:521
msgid "``X``"
msgstr "``X``"
#: ../../c-api/unicode.rst:523
msgid "The hexadecimal representation of an unsigned C integer (uppercase)."
msgstr "一個無符號 C 整數的十六進位表示法(大寫)。"
#: ../../c-api/unicode.rst:525
msgid "``c``"
msgstr "``c``"
#: ../../c-api/unicode.rst:526
msgid ":c:expr:`int`"
msgstr ":c:expr:`int`"
#: ../../c-api/unicode.rst:527
msgid "A single character."
msgstr "一個單一字元。"
#: ../../c-api/unicode.rst:529
msgid "``s``"
msgstr "``s``"
#: ../../c-api/unicode.rst:530
msgid ":c:expr:`const char*` or :c:expr:`const wchar_t*`"
msgstr ":c:expr:`const char*` 或 :c:expr:`const wchar_t*`"
#: ../../c-api/unicode.rst:531
msgid "A null-terminated C character array."
msgstr "一個以 null 結尾的 C 字元陣列。"
#: ../../c-api/unicode.rst:533
msgid "``p``"
msgstr "``p``"
#: ../../c-api/unicode.rst:534
msgid ":c:expr:`const void*`"
msgstr ":c:expr:`const void*`"
#: ../../c-api/unicode.rst:535
msgid ""
"The hex representation of a C pointer. Mostly equivalent to "
"``printf(\"%p\")`` except that it is guaranteed to start with the literal "
"``0x`` regardless of what the platform's ``printf`` yields."
msgstr ""
#: ../../c-api/unicode.rst:540
msgid "``A``"
msgstr "``A``"
#: ../../c-api/unicode.rst:541 ../../c-api/unicode.rst:545
#: ../../c-api/unicode.rst:555 ../../c-api/unicode.rst:559
#: ../../c-api/unicode.rst:563 ../../c-api/unicode.rst:568
msgid ":c:expr:`PyObject*`"
msgstr ":c:expr:`PyObject*`"
#: ../../c-api/unicode.rst:542
msgid "The result of calling :func:`ascii`."
msgstr "呼叫 :func:`ascii` 的結果。"
#: ../../c-api/unicode.rst:544
msgid "``U``"
msgstr "``U``"
#: ../../c-api/unicode.rst:546
msgid "A Unicode object."
msgstr "一個 Unicode 物件。"
#: ../../c-api/unicode.rst:548
msgid "``V``"
msgstr "``V``"
#: ../../c-api/unicode.rst:549
msgid ":c:expr:`PyObject*`, :c:expr:`const char*` or :c:expr:`const wchar_t*`"
msgstr ":c:expr:`PyObject*`、:c:expr:`const char*` 或 :c:expr:`const wchar_t*`"
#: ../../c-api/unicode.rst:550
msgid ""
"A Unicode object (which may be ``NULL``) and a null-terminated C character "
"array as a second parameter (which will be used, if the first parameter is "
"``NULL``)."
msgstr ""
#: ../../c-api/unicode.rst:554
msgid "``S``"
msgstr "``S``"
#: ../../c-api/unicode.rst:556
msgid "The result of calling :c:func:`PyObject_Str`."
msgstr "呼叫 :c:func:`PyObject_Str` 的結果。"
#: ../../c-api/unicode.rst:558
msgid "``R``"
msgstr "``R``"
#: ../../c-api/unicode.rst:560
msgid "The result of calling :c:func:`PyObject_Repr`."
msgstr "呼叫 :c:func:`PyObject_Repr` 的結果。"
#: ../../c-api/unicode.rst:562
msgid "``T``"
msgstr "``T``"
#: ../../c-api/unicode.rst:564
msgid ""
"Get the fully qualified name of an object type; call :c:func:"
"`PyType_GetFullyQualifiedName`."
msgstr ""
#: ../../c-api/unicode.rst:567
msgid "``#T``"
msgstr "``#T``"
#: ../../c-api/unicode.rst:569
msgid ""
"Similar to ``T`` format, but use a colon (``:``) as separator between the "
"module name and the qualified name."
msgstr ""
#: ../../c-api/unicode.rst:572
msgid "``N``"
msgstr "``N``"
#: ../../c-api/unicode.rst:573 ../../c-api/unicode.rst:578
msgid ":c:expr:`PyTypeObject*`"
msgstr ":c:expr:`PyTypeObject*`"
#: ../../c-api/unicode.rst:574
msgid ""
"Get the fully qualified name of a type; call :c:func:"
"`PyType_GetFullyQualifiedName`."
msgstr ""
#: ../../c-api/unicode.rst:577
msgid "``#N``"
msgstr "``#N``"
#: ../../c-api/unicode.rst:579
msgid ""
"Similar to ``N`` format, but use a colon (``:``) as separator between the "
"module name and the qualified name."
msgstr ""
#: ../../c-api/unicode.rst:583
msgid ""
"The width formatter unit is number of characters rather than bytes. The "
"precision formatter unit is number of bytes or :c:type:`wchar_t` items (if "
"the length modifier ``l`` is used) for ``\"%s\"`` and ``\"%V\"`` (if the "
"``PyObject*`` argument is ``NULL``), and a number of characters for "
"``\"%A\"``, ``\"%U\"``, ``\"%S\"``, ``\"%R\"`` and ``\"%V\"`` (if the "
"``PyObject*`` argument is not ``NULL``)."
msgstr ""
#: ../../c-api/unicode.rst:591
msgid ""
"Unlike to C :c:func:`printf` the ``0`` flag has effect even when a precision "
"is given for integer conversions (``d``, ``i``, ``u``, ``o``, ``x``, or "
"``X``)."
msgstr ""
#: ../../c-api/unicode.rst:595
msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added."
msgstr "新增對 ``\"%lld\"`` 和 ``\"%llu\"`` 的支援。"
#: ../../c-api/unicode.rst:598
msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added."
msgstr "新增對 ``\"%li\"``、``\"%lli\"`` 和 ``\"%zi\"`` 的支援。"
#: ../../c-api/unicode.rst:601
msgid ""
"Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, "
"``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added."
msgstr ""
"新增對 ``\"%s\"``、``\"%A\"``、``\"%U\"``、``\"%V\"``、``\"%S\"``、"
"``\"%R\"`` 的寬度和精確度格式化支援。"
#: ../../c-api/unicode.rst:605
msgid ""
"Support for conversion specifiers ``o`` and ``X``. Support for length "
"modifiers ``j`` and ``t``. Length modifiers are now applied to all integer "
"conversions. Length modifier ``l`` is now applied to conversion specifiers "
"``s`` and ``V``. Support for variable width and precision ``*``. Support for "
"flag ``-``."
msgstr ""
#: ../../c-api/unicode.rst:613
msgid ""
"An unrecognized format character now sets a :exc:`SystemError`. In previous "
"versions it caused all the rest of the format string to be copied as-is to "
"the result string, and any extra arguments discarded."
msgstr ""
#: ../../c-api/unicode.rst:617
msgid "Support for ``%T``, ``%#T``, ``%N`` and ``%#N`` formats added."
msgstr "新增對 ``%T``、``%#T``、``%N`` 和 ``%#N`` 格式的支援。"
#: ../../c-api/unicode.rst:623
msgid ""
"Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two "
"arguments."
msgstr ""
#: ../../c-api/unicode.rst:629
msgid ""
"Copy an instance of a Unicode subtype to a new true Unicode object if "
"necessary. If *obj* is already a true Unicode object (not a subtype), return "
"a new :term:`strong reference` to the object."
msgstr ""
#: ../../c-api/unicode.rst:633
msgid ""
"Objects other than Unicode or its subtypes will cause a :exc:`TypeError`."
msgstr ""
#: ../../c-api/unicode.rst:638
msgid "Create a Unicode Object from the given Unicode code point *ordinal*."
msgstr ""
#: ../../c-api/unicode.rst:640
msgid ""
"The ordinal must be in ``range(0x110000)``. A :exc:`ValueError` is raised in "
"the case it is not."
msgstr ""
#: ../../c-api/unicode.rst:647
msgid "Decode an encoded object *obj* to a Unicode object."
msgstr ""
#: ../../c-api/unicode.rst:649
msgid ""
":class:`bytes`, :class:`bytearray` and other :term:`bytes-like objects "
"<bytes-like object>` are decoded according to the given *encoding* and using "
"the error handling defined by *errors*. Both can be ``NULL`` to have the "
"interface use the default values (see :ref:`builtincodecs` for details)."
msgstr ""
#: ../../c-api/unicode.rst:655
msgid ""
"All other objects, including Unicode objects, cause a :exc:`TypeError` to be "
"set."
msgstr ""
#: ../../c-api/unicode.rst:658
msgid ""
"The API returns ``NULL`` if there was an error. The caller is responsible "
"for decref'ing the returned objects."
msgstr ""
#: ../../c-api/unicode.rst:664
msgid ""
"Append the string *right* to the end of *p_left*. *p_left* must point to a :"
"term:`strong reference` to a Unicode object; :c:func:`!PyUnicode_Append` "
"releases (\"steals\") this reference."
msgstr ""
#: ../../c-api/unicode.rst:668
msgid "On error, set *\\*p_left* to ``NULL`` and set an exception."
msgstr "於錯誤發生時,將 *\\*p_left* 設為 ``NULL`` 並設定例外。"
#: ../../c-api/unicode.rst:670
msgid "On success, set *\\*p_left* to a new strong reference to the result."
msgstr ""
#: ../../c-api/unicode.rst:675
msgid ""
"The function is similar to :c:func:`PyUnicode_Append`, with the only "
"difference being that it decrements the reference count of *right* by one."
msgstr ""
#: ../../c-api/unicode.rst:681
msgid ""
"Return a mapping suitable for decoding a custom single-byte encoding. Given "
"a Unicode string *string* of up to 256 characters representing an encoding "
"table, returns either a compact internal mapping object or a dictionary "
"mapping character ordinals to byte values. Raises a :exc:`TypeError` and "
"return ``NULL`` on invalid input."
msgstr ""
#: ../../c-api/unicode.rst:692
msgid ""
"Return the name of the default string encoding, ``\"utf-8\"``. See :func:"
"`sys.getdefaultencoding`."
msgstr ""
#: ../../c-api/unicode.rst:695
msgid ""
"The returned string does not need to be freed, and is valid until "
"interpreter shutdown."
msgstr ""
#: ../../c-api/unicode.rst:701
msgid "Return the length of the Unicode object, in code points."
msgstr ""
#: ../../c-api/unicode.rst:703
msgid "On error, set an exception and return ``-1``."
msgstr "發生錯誤時,設定例外並回傳 ``-1``。"
#: ../../c-api/unicode.rst:714
msgid ""
"Copy characters from one Unicode object into another. This function "
"performs character conversion when necessary and falls back to :c:func:`!"
"memcpy` if possible. Returns ``-1`` and sets an exception on error, "
"otherwise returns the number of copied characters."
msgstr ""
#: ../../c-api/unicode.rst:719 ../../c-api/unicode.rst:749
#: ../../c-api/unicode.rst:769
msgid ""
"The string must not have been “used” yet. See :c:func:`PyUnicode_New` for "
"details."
msgstr ""
#: ../../c-api/unicode.rst:727
msgid ""
"Resize a Unicode object *\\*unicode* to the new *length* in code points."
msgstr ""
#: ../../c-api/unicode.rst:729
msgid ""
"Try to resize the string in place (which is usually faster than allocating a "
"new string and copying characters), or create a new string."
msgstr ""
#: ../../c-api/unicode.rst:732
msgid ""
"*\\*unicode* is modified to point to the new (resized) object and ``0`` is "