summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/shlex.py5
-rw-r--r--Lib/test/test_sax.py6
-rw-r--r--Lib/test/test_shlex.py5
-rw-r--r--Lib/test/test_unicode.py5
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 ab54ed5..c8c7b3a 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):
"<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):
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 8494886..36a25c3 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):