Skip to content

Commit

Permalink
dump_jp2.py: fix for Python2 and non-ASCII characters
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Oct 2, 2019
1 parent d936eda commit 803d010
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gdal/swig/python/samples/dump_jp2.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ def main():
return 1
else:
s = gdal.GetJPEG2000StructureAsString(filename, ['ALL=YES'])
print(s)
if sys.version_info >= (3,0,0):
print(s)
else:
print(s.encode('UTF-8'))

return 0

Expand Down

0 comments on commit 803d010

Please sign in to comment.