Merged revisions 85861 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85861 | antoine.pitrou | 2010-10-27 20:52:48 +0200 (mer., 27 oct. 2010) | 3 lines

  Recode modules from latin-1 to utf-8
........
This commit is contained in:
Antoine Pitrou 2010-10-27 18:54:06 +00:00
parent 0619ae798d
commit 43ffd5c013
4 changed files with 9 additions and 12 deletions

View file

@ -1,4 +1,3 @@
# -*- coding: iso-8859-1 -*-
"""A lexical analyzer class for simple shell-like syntaxes."""
# Module and documentation by Eric S. Raymond, 21 Dec 1998
@ -35,8 +34,8 @@ def __init__(self, instream=None, infile=None, posix=False):
self.wordchars = ('abcdfeghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')
if self.posix:
self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
self.whitespace = ' \t\r\n'
self.whitespace_split = False
self.quotes = '\'"'

View file

@ -1,4 +1,4 @@
# regression test for SAX 2.0 -*- coding: iso-8859-1 -*-
# regression test for SAX 2.0
# $Id$
from xml.sax import make_parser, ContentHandler, \
@ -107,7 +107,7 @@ def test_escape_all(self):
"<Donald Duck & Co>")
def test_escape_extra(self):
self.assertEquals(escape("Hei på deg", {"å" : "å"}),
self.assertEquals(escape("Hei på deg", {"å" : "å"}),
"Hei på deg")
# ===== unescape
@ -119,7 +119,7 @@ def test_unescape_all(self):
"<Donald Duck & Co>")
def test_unescape_extra(self):
self.assertEquals(unescape("Hei på deg", {"å" : "&aring;"}),
self.assertEquals(unescape("Hei på deg", {"å" : "&aring;"}),
"Hei p&aring; deg")
def test_unescape_amp_extra(self):

View file

@ -1,4 +1,3 @@
# -*- coding: iso-8859-1 -*-
import unittest
import os, sys, io
import shlex
@ -68,7 +67,7 @@
foo\ bar|foo|\|bar|
foo#bar\nbaz|foobaz|
:-) ;-)|:|-|)|;|-|)|
ביםףת|ב|י|ם|ף|ת|
áéíóú|á|é|í|ó|ú|
"""
posix_data = r"""x|x|
@ -132,7 +131,7 @@
foo\ bar|foo bar|
foo#bar\nbaz|foo|baz|
:-) ;-)|:-)|;-)|
ביםףת|ביםףת|
áéíóú|áéíóú|
"""
class ShlexTest(unittest.TestCase):

View file

@ -1,4 +1,3 @@
# -*- coding: iso-8859-1 -*-
""" Test script for the Unicode implementation.
Written by Marc-Andre Lemburg (mal@lemburg.com).
@ -415,11 +414,11 @@ def test_isidentifier(self):
self.assertTrue("b0".isidentifier())
self.assertTrue("bc".isidentifier())
self.assertTrue("b_".isidentifier())
self.assertTrue("µ".isidentifier())
self.assertTrue("µ".isidentifier())
self.assertFalse(" ".isidentifier())
self.assertFalse("[".isidentifier())
self.assertFalse("©".isidentifier())
self.assertFalse("©".isidentifier())
self.assertFalse("0".isidentifier())
def test_isprintable(self):