Skip to content

Commit

Permalink
Fix BOM encoding bug with geo files
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Apr 2, 2024
1 parent 4d7cf32 commit 77f8ffc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions opendm/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def __init__(self, geo_path):

with open(self.geo_path, 'r') as f:
contents = f.read().strip()

# Strip eventual BOM characters
contents = contents.replace('\ufeff', '')

lines = list(map(str.strip, contents.split('\n')))
if lines:
Expand Down

0 comments on commit 77f8ffc

Please sign in to comment.