[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/python/python-docs-zh-tw/library/string/c-api/unicode.po [Back]  [Original]

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
#
# Translators:
# Leon H., 2017
# Liang-Bo Wang , 2016
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-08-23 00:03+0000\n"
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
"Last-Translator: Adrian Liaw \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 ""

#: ../../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 ""

#: ../../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 ""

#: ../../c-api/unicode.rst:29
msgid "Unicode Type"
msgstr ""

#: ../../c-api/unicode.rst:31
msgid ""
"These are the basic Unicode object types used for the Unicode implementation "
"in Python:"
msgstr ""

#: ../../c-api/unicode.rst:38
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:47
msgid ""
"This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit "
"type depending on the platform."
msgstr ""

#: ../../c-api/unicode.rst:50
msgid ""
"In previous versions, this was a 16-bit type or a 32-bit type depending on "
"whether you selected a \"narrow\" or \"wide\" Unicode version of Python at "
"build time."
msgstr ""

#: ../../c-api/unicode.rst:60
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:69
msgid ""
"This instance of :c:type:`PyTypeObject` represents the Python Unicode type.  "
"It is exposed to Python code as ``str``."
msgstr ""

#: ../../c-api/unicode.rst:73
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:78
msgid ""
"Return true if the object *o* is a Unicode object or an instance of a "
"Unicode subtype.  This function always succeeds."
msgstr ""

#: ../../c-api/unicode.rst:84
msgid ""
"Return true if the object *o* is a Unicode object, but not an instance of a "
"subtype.  This function always succeeds."
msgstr ""

#: ../../c-api/unicode.rst:90
msgid "Returns ``0``. This API is kept only for backward compatibility."
msgstr ""

#: ../../c-api/unicode.rst:94
msgid "This API does nothing since Python 3.12."
msgstr ""

#: ../../c-api/unicode.rst:100
msgid ""
"Return the length of the Unicode string, in code points.  *o* has to be a "
"Unicode object in the \"canonical\" representation (not checked)."
msgstr ""

#: ../../c-api/unicode.rst:110
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:122
msgid "Return values of the :c:func:`PyUnicode_KIND` macro."
msgstr ""

#: ../../c-api/unicode.rst:126
msgid "``PyUnicode_WCHAR_KIND`` has been removed."
msgstr "``PyUnicode_WCHAR_KIND`` "

#: ../../c-api/unicode.rst:132
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.  *o* "
"has to be a Unicode object in the \"canonical\" representation (not checked)."
msgstr ""

#: ../../c-api/unicode.rst:141
msgid ""
"Return a void pointer to the raw Unicode buffer.  *o* has to be a Unicode "
"object in the \"canonical\" representation (not checked)."
msgstr ""

#: ../../c-api/unicode.rst:150
msgid ""
"Write into a canonical representation *data* (as obtained with :c:func:"
"`PyUnicode_DATA`).  This function performs no sanity checks, and is intended "
"for usage in loops.  The caller should cache the *kind* value and *data* "
"pointer as obtained from other calls.  *index* is the index in the string "
"(starts at 0) and *value* is the new code point value which should be "
"written to that location."
msgstr ""

#: ../../c-api/unicode.rst:163
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:171
msgid ""
"Read a character from a Unicode object *o*, 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:180
msgid ""
"Return the maximum code point that is suitable for creating another string "
"based on *o*, 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:189
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:192
msgid ""
"The function does not call :c:func:`Py_FatalError` anymore if the string is "
"not ready."
msgstr ""

#: ../../c-api/unicode.rst:198
msgid "Unicode Character Properties"
msgstr ""

#: ../../c-api/unicode.rst:200
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:207
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a whitespace character."
msgstr ""

#: ../../c-api/unicode.rst:212
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a lowercase character."
msgstr ""

#: ../../c-api/unicode.rst:217
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an uppercase character."
msgstr ""

#: ../../c-api/unicode.rst:222
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a titlecase character."
msgstr ""

#: ../../c-api/unicode.rst:227
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a linebreak character."
msgstr ""

#: ../../c-api/unicode.rst:232
msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character."
msgstr ""

#: ../../c-api/unicode.rst:237
msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character."
msgstr ""

#: ../../c-api/unicode.rst:242
msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character."
msgstr ""

#: ../../c-api/unicode.rst:247
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character."
msgstr ""

#: ../../c-api/unicode.rst:252
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character."
msgstr ""

#: ../../c-api/unicode.rst:257
msgid ""
"Return ``1`` or ``0`` depending on whether *ch* is a printable character. "
"Nonprintable characters are those characters defined in the Unicode "
"character database as \"Other\" or \"Separator\", excepting the ASCII space "
"(0x20) which is considered printable.  (Note that printable characters in "
"this context are those which should not be escaped when :func:`repr` is "
"invoked on a string. It has no bearing on the handling of strings written "
"to :data:`sys.stdout` or :data:`sys.stderr`.)"
msgstr ""

#: ../../c-api/unicode.rst:266
msgid "These APIs can be used for fast direct character conversions:"
msgstr ""

#: ../../c-api/unicode.rst:271
msgid "Return the character *ch* converted to lower case."
msgstr ""

#: ../../c-api/unicode.rst:273 ../../c-api/unicode.rst:281
#: ../../c-api/unicode.rst:289
msgid "This function uses simple case mappings."
msgstr ""

#: ../../c-api/unicode.rst:279
msgid "Return the character *ch* converted to upper case."
msgstr ""

#: ../../c-api/unicode.rst:287
msgid "Return the character *ch* converted to title case."
msgstr ""

#: ../../c-api/unicode.rst:295
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 ""

#: ../../c-api/unicode.rst:301
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 ""

#: ../../c-api/unicode.rst:307
msgid ""
"Return the character *ch* converted to a double. Return ``-1.0`` if this is "
"not possible.  This function does not raise exceptions."
msgstr ""

#: ../../c-api/unicode.rst:311
msgid "These APIs can be used to work with surrogates:"
msgstr ""

#: ../../c-api/unicode.rst:315
msgid "Check if *ch* is a surrogate (``0xD800 

Web Proxy Viewer  |  New URL  |  Original Page