diff options
| author | Tomaz Solc <tomaz.solc@tablix.org> | 2011-09-21 17:54:59 +0200 |
|---|---|---|
| committer | Tomaz Solc <tomaz.solc@tablix.org> | 2011-09-22 16:56:07 +0200 |
| commit | 4f5d0a6600a22d32236663c8b23e6757f48b1663 (patch) | |
| tree | 8dfe5197dc37078561dbfbbb9083e7ba386de1a2 /unidecode/__init__.py | |
| parent | 37cf5550dad2871edaf9e2f987e713d4eb33aa7c (diff) | |
| download | unidecode-4f5d0a6600a22d32236663c8b23e6757f48b1663.tar.gz | |
Always return a string object on Python 2.x
Before this patch, unidecode() returned a unicode object on Python 2.x if the input was a unicode object that contained ASCII characters. Behaviour on Python 3.x remains unchanged.
Diffstat (limited to 'unidecode/__init__.py')
| -rw-r--r-- | unidecode/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unidecode/__init__.py b/unidecode/__init__.py index 1b04539..4a08bf0 100644 --- a/unidecode/__init__.py +++ b/unidecode/__init__.py @@ -28,7 +28,7 @@ def unidecode(string): codepoint = ord(char) if codepoint < 0x80: # Basic ASCII - retval.append(char) + retval.append(str(char)) continue if codepoint > 0xeffff: |
