summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas <twvd@users.noreply.github.com>2019-11-07 00:32:05 +0100
committerPaul McGuire <ptmcg@users.noreply.github.com>2019-11-06 17:32:05 -0600
commitd7fb0d83fd12cb7a78e917414e0c303106df0693 (patch)
tree84792687e8940b2c68db47c1ced5d3614ffe255f
parentc9142bd72cb959227266465726412127ebf85d35 (diff)
downloadpyparsing-git-d7fb0d83fd12cb7a78e917414e0c303106df0693.tar.gz
Explicitly specify UTF-8 encoding when opening README file (#163)
* Explicitly specify UTF-8 encoding when opening README file * Fix Python 2.6.x+ support for setup.py * Removed stray unicode space character from README.rst
-rw-r--r--README.rst2
-rw-r--r--setup.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index dca0a71..e47d92a 100644
--- a/README.rst
+++ b/README.rst
@@ -7,7 +7,7 @@ Introduction
============
The pyparsing module is an alternative approach to creating and
-executing simple grammars, vs. the traditional lex/yacc approach, or the
+executing simple grammars, vs. the traditional lex/yacc approach, or the
use of regular expressions. The pyparsing module provides a library of
classes that client code uses to construct the grammar directly in
Python code.
diff --git a/setup.py b/setup.py
index 2740521..604c082 100644
--- a/setup.py
+++ b/setup.py
@@ -4,12 +4,13 @@
from setuptools import setup
from pyparsing import __version__ as pyparsing_version
+from io import open
# The directory containing this file
README_name = __file__.replace("setup.py", "README.rst")
# The text of the README file
-with open(README_name) as README:
+with open(README_name, encoding='utf8') as README:
pyparsing_main_doc = README.read()
modules = ["pyparsing",]