Skip to content

Commit

Permalink
Merge pull request #1752 from pierotofy/geobom
Browse files Browse the repository at this point in the history
Fix BOM encoding bug with geo files
  • Loading branch information
pierotofy authored Apr 2, 2024
2 parents 4d7cf32 + 77f8ffc commit ad63392
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 ad63392

Please sign in to comment.