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
47ce9655
Kaydet (Commit)
47ce9655
authored
Eki 29, 2010
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
What's New in Python 3.2: update Unicode section
üst
6f35eda4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
3.2.rst
Doc/whatsnew/3.2.rst
+21
-10
No files found.
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
47ce9655
...
...
@@ -573,13 +573,29 @@ A number of small performance enhancements have been added:
and the Unladen Swallow team in :issue:`9410` and :issue:`3873`.)
Filenames and
Unicode
=======
==============
Unicode
=======
The :mod:`os` module has two new functions: :func:`~os.fsencode` and
:func:`~os.fsdecode`.
:func:`~os.fsdecode`. Add :data:`os.environb`: bytes version of
:data:`os.environ`, :func:`os.getenvb` function and
:data:`os.supports_bytes_environ` constant.
``'mbcs'`` encoding doesn't ignore the error handler argument anymore. By
default (strict mode), it raises an UnicodeDecodeError on undecodable byte
sequence and UnicodeEncodeError on unencodable character. To get the ``'mbcs'``
encoding of Python 3.1, use ``'ignore'`` error handler to decode and
``'replace'`` error handler to encode. ``'mbcs'`` supports ``'strict'`` and
``'ignore'`` error handlers for decoding, and ``'strict'`` and ``'replace'``
for encoding.
On Mac OS X, Python uses ``'utf-8'`` to decode the command line arguments,
instead of the locale encoding (which is ISO-8859-1 if the ``LANG`` environment
variable is not set).
.. XXX mention Victor's improvements for support of undecodable filenames.
By default, tarfile uses ``'utf-8'`` encoding on Windows (instead of
``'mbcs'``), and the ``'surrogateescape'`` error handler on all operating
systems.
.. IDLE
...
...
@@ -642,9 +658,4 @@ require changes to your code:
instead; the new type has a well-defined interface for passing typing safety
information and a less complicated signature for calling a destructor.
* mbcs encoding doesn't ignore the error handler argument anymore. By default
(strict mode), it raises an UnicodeDecodeError on undecodable byte sequence
and UnicodeEncodeError on unencodable character. To get the mbcs encoding of
Python 3.1, use ``'ignore'`` error handler to decode and ``'replace'`` error
handler to encode. mbcs now supports ``'strict'`` and ``'ignore'`` error
handlers for decoding, and ``'strict'`` and ``'replace'`` for encoding.
* Remove sys.setfilesystemencoding() function: it was broken by design.
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