Dict: Fix encoding.

This commit is contained in:
Valentin Lorentz 2013-01-06 19:54:04 +01:00
parent 8e6aa116d3
commit add5e07d97
2 changed files with 3 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class Connection:
part only. Does not get any codes or anything! Returns a string.""" part only. Does not get any codes or anything! Returns a string."""
data = [] data = []
while 1: while 1:
line = self.rfile.readline().decode('ascii').strip() line = self.rfile.readline().decode('utf8').strip()
if line == '.': if line == '.':
break break
data.append(line) data.append(line)

View File

@ -1,3 +1,4 @@
# -*- coding: utf8 -*-
### ###
# Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2002-2004, Jeremiah Fincher
# All rights reserved. # All rights reserved.
@ -36,6 +37,7 @@ class DictTestCase(PluginTestCase):
self.assertNotError('dict slash') self.assertNotError('dict slash')
self.assertNotRegexp('dict web1913 slash', 'foldoc') self.assertNotRegexp('dict web1913 slash', 'foldoc')
self.assertError('dict ""') self.assertError('dict ""')
self.assertRegexp('dict eng-fra school', 'école')
def testDictionaries(self): def testDictionaries(self):
self.assertNotError('dictionaries') self.assertNotError('dictionaries')