[Idle-dev] CVS: idle IOBinding.py,1.8,1.9

Tony Lownds tonylownds@users.sourceforge.net
Sun, 22 Sep 2002 18:01:22 -0700


Update of /cvsroot/idlefork/idle
In directory usw-pr-cvs1:/tmp/cvs-serv10880

Modified Files:
	IOBinding.py 
Log Message:
Work around Mac OS X platform encoding issues.

Index: IOBinding.py
===================================================================
RCS file: /cvsroot/idlefork/idle/IOBinding.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** IOBinding.py	16 Sep 2002 22:03:37 -0000	1.8
--- IOBinding.py	23 Sep 2002 01:01:20 -0000	1.9
***************
*** 66,69 ****
--- 66,72 ----
          # these problems, falling back to ASCII
          encoding = locale.nl_langinfo(locale.CODESET)
+         if encoding is None:
+             # situation occurs on Mac OS X
+             encoding = 'ascii'
          codecs.lookup(encoding)
      except (NameError, AttributeError, LookupError):
***************
*** 73,76 ****
--- 76,82 ----
          try:
              encoding = locale.getdefaultlocale()[1]
+             if encoding is None:
+                 # situation occurs on Mac OS X
+                 encoding = 'ascii'
              codecs.lookup(encoding)
          except (ValueError, LookupError):