-Fixed issue 52. Improved handling of BOM-less UTF-8 encoded files.
git-svn-id: http://pydot.googlecode.com/svn/trunk@28 06aa9b79-7134-0410-ae7e-c1cd3e483e87
This commit is contained in:
parent
9999c00c26
commit
9875c08935
|
@ -505,11 +505,9 @@ def parse_dot_data(data):
|
|||
global top_graphs
|
||||
|
||||
top_graphs = list()
|
||||
|
||||
|
||||
if data.startswith( codecs.BOM_UTF8 ):
|
||||
data = data.decode( 'utf-8' ).lstrip( unicode(codecs.BOM_UTF8, "utf8") )
|
||||
data = data.encode( 'ascii' )
|
||||
|
||||
if data.startswith(codecs.BOM_UTF8):
|
||||
data = data.decode( 'utf-8' )
|
||||
|
||||
try:
|
||||
|
||||
|
|
Loading…
Reference in New Issue