Fix issues with codecs.BOM_UTF8 (pattern.graph)
@@ -23,6 +23,7 @@ from .__init__ import Graph, Node, Edge, bfs
from .__init__ import WEIGHT, CENTRALITY, EIGENVECTOR, BETWEENNESS
import os
+import sys
from past.builtins import basestring
@@ -31,6 +32,11 @@ try:
except:
MODULE = ""
+if sys.version > "3":
+ BOM_UTF8 = str(BOM_UTF8.decode("utf-8"))
+else:
+ BOM_UTF8 = BOM_UTF8.decode("utf-8")
+
#### COMMONSENSE SEMANTIC NETWORK ##################################################################
#--- CONCEPT ---------------------------------------------------------------------------------------
