diff --git a/setup.py b/setup.py index b9e683f..541163a 100644 --- a/setup.py +++ b/setup.py @@ -1,13 +1,18 @@ from setuptools import setup, find_packages +import io from os import path import re -VERSION = re.search("VERSION = '([^']+)'", open( - path.join(path.dirname(__file__), 'webencodings', '__init__.py') +VERSION = re.search("VERSION = '([^']+)'", io.open( + path.join(path.dirname(__file__), 'webencodings', '__init__.py'), + encoding='utf-8' ).read().strip()).group(1) -LONG_DESCRIPTION = open(path.join(path.dirname(__file__), 'README.rst')).read() +LONG_DESCRIPTION = io.open( + path.join(path.dirname(__file__), 'README.rst'), + encoding='utf-8' +).read() setup( diff --git a/webencodings/__init__.py b/webencodings/__init__.py index 1ddec05..96171f0 100644 --- a/webencodings/__init__.py +++ b/webencodings/__init__.py @@ -185,7 +185,7 @@ def encode(input, encoding=UTF8, errors='strict'): def iter_decode(input, fallback_encoding, errors='replace'): """ - “Pull”-based decoder. + "Pull"-based decoder. :param input: An iterable of byte strings.