Recode modules from latin-1 to utf-8
This commit is contained in:
parent
6b03ee6033
commit
d72402effc
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: iso-8859-1 -*-
|
|
||||||
"""A lexical analyzer class for simple shell-like syntaxes."""
|
"""A lexical analyzer class for simple shell-like syntaxes."""
|
||||||
|
|
||||||
# Module and documentation by Eric S. Raymond, 21 Dec 1998
|
# Module and documentation by Eric S. Raymond, 21 Dec 1998
|
||||||
|
@ -35,8 +34,8 @@ class shlex:
|
||||||
self.wordchars = ('abcdfeghijklmnopqrstuvwxyz'
|
self.wordchars = ('abcdfeghijklmnopqrstuvwxyz'
|
||||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')
|
||||||
if self.posix:
|
if self.posix:
|
||||||
self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
|
self.wordchars += ('ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
|
||||||
'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
|
'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ')
|
||||||
self.whitespace = ' \t\r\n'
|
self.whitespace = ' \t\r\n'
|
||||||
self.whitespace_split = False
|
self.whitespace_split = False
|
||||||
self.quotes = '\'"'
|
self.quotes = '\'"'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# regression test for SAX 2.0 -*- coding: iso-8859-1 -*-
|
# regression test for SAX 2.0
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
from xml.sax import make_parser, ContentHandler, \
|
from xml.sax import make_parser, ContentHandler, \
|
||||||
|
@ -114,7 +114,7 @@ class SaxutilsTest(unittest.TestCase):
|
||||||
"<Donald Duck & Co>")
|
"<Donald Duck & Co>")
|
||||||
|
|
||||||
def test_escape_extra(self):
|
def test_escape_extra(self):
|
||||||
self.assertEquals(escape("Hei på deg", {"å" : "å"}),
|
self.assertEquals(escape("Hei på deg", {"å" : "å"}),
|
||||||
"Hei på deg")
|
"Hei på deg")
|
||||||
|
|
||||||
# ===== unescape
|
# ===== unescape
|
||||||
|
@ -126,7 +126,7 @@ class SaxutilsTest(unittest.TestCase):
|
||||||
"<Donald Duck & Co>")
|
"<Donald Duck & Co>")
|
||||||
|
|
||||||
def test_unescape_extra(self):
|
def test_unescape_extra(self):
|
||||||
self.assertEquals(unescape("Hei på deg", {"å" : "å"}),
|
self.assertEquals(unescape("Hei på deg", {"å" : "å"}),
|
||||||
"Hei på deg")
|
"Hei på deg")
|
||||||
|
|
||||||
def test_unescape_amp_extra(self):
|
def test_unescape_amp_extra(self):
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: iso-8859-1 -*-
|
|
||||||
import unittest
|
import unittest
|
||||||
import os, sys, io
|
import os, sys, io
|
||||||
import shlex
|
import shlex
|
||||||
|
@ -68,7 +67,7 @@ foo\ x\x\""|foo|\|x|\|x|\|""|
|
||||||
foo\ bar|foo|\|bar|
|
foo\ bar|foo|\|bar|
|
||||||
foo#bar\nbaz|foobaz|
|
foo#bar\nbaz|foobaz|
|
||||||
:-) ;-)|:|-|)|;|-|)|
|
:-) ;-)|:|-|)|;|-|)|
|
||||||
ביםףת|ב|י|ם|ף|ת|
|
áéíóú|á|é|í|ó|ú|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
posix_data = r"""x|x|
|
posix_data = r"""x|x|
|
||||||
|
@ -132,7 +131,7 @@ foo\ x\x\"|foo xx"|
|
||||||
foo\ bar|foo bar|
|
foo\ bar|foo bar|
|
||||||
foo#bar\nbaz|foo|baz|
|
foo#bar\nbaz|foo|baz|
|
||||||
:-) ;-)|:-)|;-)|
|
:-) ;-)|:-)|;-)|
|
||||||
ביםףת|ביםףת|
|
áéíóú|áéíóú|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class ShlexTest(unittest.TestCase):
|
class ShlexTest(unittest.TestCase):
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: iso-8859-1 -*-
|
|
||||||
""" Test script for the Unicode implementation.
|
""" Test script for the Unicode implementation.
|
||||||
|
|
||||||
Written by Marc-Andre Lemburg (mal@lemburg.com).
|
Written by Marc-Andre Lemburg (mal@lemburg.com).
|
||||||
|
@ -403,11 +402,11 @@ class UnicodeTest(string_tests.CommonTest,
|
||||||
self.assertTrue("b0".isidentifier())
|
self.assertTrue("b0".isidentifier())
|
||||||
self.assertTrue("bc".isidentifier())
|
self.assertTrue("bc".isidentifier())
|
||||||
self.assertTrue("b_".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("©".isidentifier())
|
self.assertFalse("©".isidentifier())
|
||||||
self.assertFalse("0".isidentifier())
|
self.assertFalse("0".isidentifier())
|
||||||
|
|
||||||
def test_isprintable(self):
|
def test_isprintable(self):
|
||||||
|
|
Loading…
Reference in New Issue