Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
54b40ee9
Commit
54b40ee9
authored
May 22, 2010
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix my last commit (r81471) about codecs
Rememder: don't touch the code just before a commit
parent
7df55dad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Lib/encodings/utf_16.py
Lib/encodings/utf_16.py
+3
-3
Lib/encodings/utf_32.py
Lib/encodings/utf_32.py
+3
-3
No files found.
Lib/encodings/utf_16.py
View file @
54b40ee9
...
...
@@ -67,11 +67,11 @@ class StreamWriter(codecs.StreamWriter):
def
encode
(
self
,
input
,
errors
=
'strict'
):
if
self
.
encoder
is
None
:
result
=
codecs
.
utf_16
encoder
(
input
,
errors
)
result
=
codecs
.
utf_16
_encode
(
input
,
errors
)
if
sys
.
byteorder
==
'little'
:
self
.
encoder
=
codecs
.
utf_16_le
encoder
self
.
encoder
=
codecs
.
utf_16_le
_encode
else
:
self
.
encoder
=
codecs
.
utf_16_be
encoder
self
.
encoder
=
codecs
.
utf_16_be
_encode
return
result
else
:
return
self
.
encoder
(
input
,
errors
)
...
...
Lib/encodings/utf_32.py
View file @
54b40ee9
...
...
@@ -107,11 +107,11 @@ class StreamWriter(codecs.StreamWriter):
def
encode
(
self
,
input
,
errors
=
'strict'
):
if
self
.
encoder
is
None
:
result
=
codecs
.
utf_32
encoder
(
input
,
errors
)
result
=
codecs
.
utf_32
_encode
(
input
,
errors
)
if
sys
.
byteorder
==
'little'
:
self
.
encoder
=
codecs
.
utf_32_le
encoder
self
.
encoder
=
codecs
.
utf_32_le
_encode
else
:
self
.
encoder
=
codecs
.
utf_32_be
encoder
self
.
encoder
=
codecs
.
utf_32_be
_encode
return
result
else
:
return
self
.
encoder
(
input
,
errors
)
...
...
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