1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
From c9c1c097f201f2ab2962ac450938c430b3d3dd2f Mon Sep 17 00:00:00 2001
From: Vachaspati <vachasp2@taubh1.campuscluster.illinois.edu>
Date: Fri, 19 Jun 2015 06:03:16 -0500
Subject: [PATCH] Fix bug where encoding for default locale is None.
---
dendropy/utility/textprocessing.py | 3 +++
1 file changed, 3 insertions(+)
--- a/dendropy/utility/textprocessing.py
+++ b/dendropy/utility/textprocessing.py
@@ -42,6 +42,9 @@ ENCODING = locale.getdefaultlocale()[1]
if ENCODING == None:
ENCODING = 'UTF-8'
+if ENCODING == None:
+ ENCODING = 'UTF-8'
+
def bytes_to_text(s):
"""
Converts a byte string (as read from, e.g., standard input)
|