Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
62165d67
Kaydet (Commit)
62165d67
authored
Eki 09, 2010
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Document that the 'strict' error handler is used to encode/decode filenames on
Windows
üst
257d38ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
unicode.rst
Doc/c-api/unicode.rst
+13
-6
os.rst
Doc/library/os.rst
+2
-6
No files found.
Doc/c-api/unicode.rst
Dosyayı görüntüle @
62165d67
...
@@ -412,26 +412,33 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
...
@@ -412,26 +412,33 @@ used, passing :c:func:`PyUnicode_FSDecoder` as the conversion function:
.. c:function:: PyObject* PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size)
.. c:function:: PyObject* PyUnicode_DecodeFSDefaultAndSize(const char *s, Py_ssize_t size)
Decode a
null-terminated string using :c:data:`Py_FileSystemDefaultEncoding`
Decode a
string using :c:data:`Py_FileSystemDefaultEncoding` and the
and the ``"surrogateescape"`` error handler
.
``'surrogateescape'`` error handler, or ``'strict'`` on Windows
.
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length.
.. versionchanged:: 3.2
Use ``'strict'`` error handler on Windows.
.. c:function:: PyObject* PyUnicode_DecodeFSDefault(const char *s)
.. c:function:: PyObject* PyUnicode_DecodeFSDefault(const char *s)
Decode a
string using :c:data:`Py_FileSystemDefaultEncoding` and
Decode a
null-terminated string using :c:data:`Py_FileSystemDefaultEncoding`
the ``"surrogateescape"`` error handler
.
and the ``'surrogateescape'`` error handler, or ``'strict'`` on Windows
.
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length.
.. versionchanged:: 3.2
Use ``'strict'`` error handler on Windows.
.. c:function:: PyObject* PyUnicode_EncodeFSDefault(PyObject *unicode)
.. c:function:: PyObject* PyUnicode_EncodeFSDefault(PyObject *unicode)
Encode a Unicode object to :c:data:`Py_FileSystemDefaultEncoding` with the
Encode a Unicode object to :c:data:`Py_FileSystemDefaultEncoding` with the
``'surrogateescape'`` error handler, and return :class:`bytes`.
``'surrogateescape'`` error handler, or ``'strict'`` on Windows, and return
:class:`bytes`.
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to UTF-8.
...
...
Doc/library/os.rst
Dosyayı görüntüle @
62165d67
...
@@ -158,9 +158,7 @@ process and user.
...
@@ -158,9 +158,7 @@ process and user.
.. function:: fsencode(filename)
.. function:: fsencode(filename)
Encode *filename* to the filesystem encoding with ``'surrogateescape'``
Encode *filename* to the filesystem encoding with ``'surrogateescape'``
error handler, return :class:`bytes` unchanged. On Windows, use ``'strict'``
error handler, or ``'strict'`` on Windows; return :class:`bytes` unchanged.
error handler if the filesystem encoding is ``'mbcs'`` (which is the default
encoding).
:func:`fsdecode` is the reverse function.
:func:`fsdecode` is the reverse function.
...
@@ -170,9 +168,7 @@ process and user.
...
@@ -170,9 +168,7 @@ process and user.
.. function:: fsdecode(filename)
.. function:: fsdecode(filename)
Decode *filename* from the filesystem encoding with ``'surrogateescape'``
Decode *filename* from the filesystem encoding with ``'surrogateescape'``
error handler, return :class:`str` unchanged. On Windows, use ``'strict'``
error handler, or ``'strict'`` on Windows; return :class:`str` unchanged.
error handler if the filesystem encoding is ``'mbcs'`` (which is the default
encoding).
:func:`fsencode` is the reverse function.
:func:`fsencode` is the reverse function.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment