From 43ffd5c01364748fbb8f8113195f32863c833a19 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 27 Oct 2010 18:54:06 +0000 Subject: [PATCH] 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 ........ --- Lib/shlex.py | 5 ++--- Lib/test/test_sax.py | 6 +++--- Lib/test/test_shlex.py | 5 ++--- Lib/test/test_unicode.py | 5 ++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Lib/shlex.py b/Lib/shlex.py index 55db23cf03..3edd3db1ed 100644 --- a/Lib/shlex.py +++ b/Lib/shlex.py @@ -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 @@ class shlex: self.wordchars = ('abcdfeghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_') if self.posix: - self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ' - 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ') + self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ' + 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ') self.whitespace = ' \t\r\n' self.whitespace_split = False self.quotes = '\'"' diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py index ab54ed5616..c8c7b3a34b 100644 --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -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 @@ class SaxutilsTest(unittest.TestCase): "<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 @@ class SaxutilsTest(unittest.TestCase): "") def test_unescape_extra(self): - self.assertEquals(unescape("Hei på deg", {"å" : "å"}), + self.assertEquals(unescape("Hei pÃ¥ deg", {"Ã¥" : "å"}), "Hei på deg") def test_unescape_amp_extra(self): diff --git a/Lib/test/test_shlex.py b/Lib/test/test_shlex.py index 1685938d79..25e4b6df6c 100644 --- a/Lib/test/test_shlex.py +++ b/Lib/test/test_shlex.py @@ -1,4 +1,3 @@ -# -*- coding: iso-8859-1 -*- import unittest import os, sys, io import shlex @@ -68,7 +67,7 @@ foo\ x\x\""|foo|\|x|\|x|\|""| foo\ bar|foo|\|bar| foo#bar\nbaz|foobaz| :-) ;-)|:|-|)|;|-|)| -áéíóú|á|é|í|ó|ú| +áéíóú|á|é|í|ó|ú| """ posix_data = r"""x|x| @@ -132,7 +131,7 @@ foo\ x\x\"|foo xx"| foo\ bar|foo bar| foo#bar\nbaz|foo|baz| :-) ;-)|:-)|;-)| -áéíóú|áéíóú| +áéíóú|áéíóú| """ class ShlexTest(unittest.TestCase): diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py index 84948868e5..36a25c39a9 100644 --- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -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 @@ class UnicodeTest( 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): -- 2.40.0