[Python-checkins] python/dist/src/Lib/idlelib IOBinding.py, 1.23,
1.24
loewis at users.sourceforge.net
loewis at users.sourceforge.net
Thu Aug 12 15:14:55 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11377
Modified Files:
IOBinding.py
Log Message:
Patch #808719: Ignore the locale's encoding if it is an empty string.
Backported to 2.3.
Index: IOBinding.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/IOBinding.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** IOBinding.py 11 Apr 2004 03:16:07 -0000 1.23
--- IOBinding.py 12 Aug 2004 13:14:52 -0000 1.24
***************
*** 49,53 ****
# these problems, falling back to ASCII
encoding = locale.nl_langinfo(locale.CODESET)
! if encoding is None:
# situation occurs on Mac OS X
encoding = 'ascii'
--- 49,53 ----
# these problems, falling back to ASCII
encoding = locale.nl_langinfo(locale.CODESET)
! if encoding is None or encoding is '':
# situation occurs on Mac OS X
encoding = 'ascii'
***************
*** 59,63 ****
try:
encoding = locale.getdefaultlocale()[1]
! if encoding is None:
# situation occurs on Mac OS X
encoding = 'ascii'
--- 59,63 ----
try:
encoding = locale.getdefaultlocale()[1]
! if encoding is None or encoding is '':
# situation occurs on Mac OS X
encoding = 'ascii'
More information about the Python-checkins
mailing list