diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-27 18:52:48 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-27 18:52:48 (GMT) |
commit | d72402effcc3ab4dd8dbdfc1e6f12aebcf3d3e13 (patch) | |
tree | 84c50ff069ed27b1b807ab64d49ce5b69be31e9b /Lib | |
parent | 6b03ee603315ac9e69332c8f2d064de0a98c3f15 (diff) | |
download | cpython-d72402effcc3ab4dd8dbdfc1e6f12aebcf3d3e13.zip cpython-d72402effcc3ab4dd8dbdfc1e6f12aebcf3d3e13.tar.gz cpython-d72402effcc3ab4dd8dbdfc1e6f12aebcf3d3e13.tar.bz2 |
Recode modules from latin-1 to utf-8
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/shlex.py | 5 | ||||
-rw-r--r-- | Lib/test/test_sax.py | 6 | ||||
-rw-r--r-- | Lib/test/test_shlex.py | 5 | ||||
-rw-r--r-- | Lib/test/test_unicode.py | 5 |
4 files changed, 9 insertions, 12 deletions
diff --git a/Lib/shlex.py b/Lib/shlex.py index 55db23c..3edd3db 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 c4b211f..6a20513 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, \ @@ -114,7 +114,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 @@ -126,7 +126,7 @@ class SaxutilsTest(unittest.TestCase): "<Donald Duck & Co>") 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 1685938..25e4b6d 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 94035ef..7927834 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). @@ -403,11 +402,11 @@ class UnicodeTest(string_tests.CommonTest, 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): |