Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
8f293180
Unverified
Commit
8f293180
authored
2 years ago
by
slateny
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gh-77630: Change Charset to charset (GH-92439)
parent
5ed5c561
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Doc/library/email.charset.rst
+7
-7
7 additions, 7 deletions
Doc/library/email.charset.rst
Lib/email/charset.py
+5
-5
5 additions, 5 deletions
Lib/email/charset.py
with
12 additions
and
12 deletions
Doc/library/email.charset.rst
+
7
−
7
View file @
8f293180
...
...
@@ -58,9 +58,9 @@ Import this class from the :mod:`email.charset` module.
.. attribute:: header_encoding
If the character set must be encoded before it can be used in an email
header, this attribute will be set to ``
C
harset.QP`` (for
quoted-printable), ``
C
harset.BASE64`` (for base64 encoding), or
``
C
harset.SHORTEST`` for the shortest of QP or BASE64 encoding. Otherwise,
header, this attribute will be set to ``
c
harset.QP`` (for
quoted-printable), ``
c
harset.BASE64`` (for base64 encoding), or
``
c
harset.SHORTEST`` for the shortest of QP or BASE64 encoding. Otherwise,
it will be ``None``.
...
...
@@ -68,7 +68,7 @@ Import this class from the :mod:`email.charset` module.
Same as *header_encoding*, but describes the encoding for the mail
message's body, which indeed may be different than the header encoding.
``
C
harset.SHORTEST`` is not allowed for *body_encoding*.
``
c
harset.SHORTEST`` is not allowed for *body_encoding*.
.. attribute:: output_charset
...
...
@@ -175,9 +175,9 @@ new entries to the global character set, alias, and codec registries:
*charset* is the input character set, and must be the canonical name of a
character set.
Optional *header_enc* and *body_enc* is either ``
C
harset.QP`` for
quoted-printable, ``
C
harset.BASE64`` for base64 encoding,
``
C
harset.SHORTEST`` for the shortest of quoted-printable or base64 encoding,
Optional *header_enc* and *body_enc* is either ``
c
harset.QP`` for
quoted-printable, ``
c
harset.BASE64`` for base64 encoding,
``
c
harset.SHORTEST`` for the shortest of quoted-printable or base64 encoding,
or ``None`` for no encoding. ``SHORTEST`` is only valid for
*header_enc*. The default is ``None`` for no encoding.
...
...
This diff is collapsed.
Click to expand it.
Lib/email/charset.py
+
5
−
5
View file @
8f293180
...
...
@@ -112,8 +112,8 @@ def add_charset(charset, header_enc=None, body_enc=None, output_charset=None):
charset is the input character set, and must be the canonical name of a
character set.
Optional header_enc and body_enc is either
C
harset.QP for
quoted-printable,
C
harset.BASE64 for base64 encoding,
C
harset.SHORTEST for
Optional header_enc and body_enc is either
c
harset.QP for
quoted-printable,
c
harset.BASE64 for base64 encoding,
c
harset.SHORTEST for
the shortest of qp or base64 encoding, or None for no encoding. SHORTEST
is only valid for header_enc. It describes how message headers and
message bodies in the input charset are to be encoded. Default is no
...
...
@@ -185,13 +185,13 @@ class Charset:
header_encoding: If the character set must be encoded before it can be
used in an email header, this attribute will be set to
C
harset.QP (for quoted-printable),
C
harset.BASE64 (for
base64 encoding), or
C
harset.SHORTEST for the shortest of
c
harset.QP (for quoted-printable),
c
harset.BASE64 (for
base64 encoding), or
c
harset.SHORTEST for the shortest of
QP or BASE64 encoding. Otherwise, it will be None.
body_encoding: Same as header_encoding, but describes the encoding for the
mail message
'
s body, which indeed may be different than the
header encoding.
C
harset.SHORTEST is not allowed for
header encoding.
c
harset.SHORTEST is not allowed for
body_encoding.
output_charset: Some character sets must be converted before they can be
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment