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
61e5616d
Kaydet (Commit)
61e5616d
authored
May 13, 2004
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but
still 7-bit.
üst
4e59bc1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
Encoders.py
Lib/email/Encoders.py
+10
-5
No files found.
Lib/email/Encoders.py
Dosyayı görüntüle @
61e5616d
# Copyright (C) 2001
,2002
Python Software Foundation
# Author: barry@
zope.com
(Barry Warsaw)
# Copyright (C) 2001
-2004
Python Software Foundation
# Author: barry@
python.org
(Barry Warsaw)
"""Module containing encoding functions for Image.Image and Text.Text.
"""
"""Encodings and related functions."""
import
base64
...
...
@@ -84,7 +83,13 @@ def encode_7or8bit(msg):
try
:
orig
.
encode
(
'ascii'
)
except
UnicodeError
:
msg
[
'Content-Transfer-Encoding'
]
=
'8bit'
# iso-2022-* is non-ASCII but still 7-bit
charset
=
msg
.
get_charset
()
output_cset
=
charset
and
charset
.
output_charset
if
output_cset
and
output_cset
.
lower
()
.
startswith
(
'iso-2202-'
):
msg
[
'Content-Transfer-Encoding'
]
=
'7bit'
else
:
msg
[
'Content-Transfer-Encoding'
]
=
'8bit'
else
:
msg
[
'Content-Transfer-Encoding'
]
=
'7bit'
...
...
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