Merge pull request #1752 from pierotofy/geobom

Fix BOM encoding bug with geo files
pull/1756/head
Piero Toffanin 2024-04-02 12:53:35 -04:00 zatwierdzone przez GitHub
commit ad63392e1a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -12,6 +12,9 @@ class GeoFile:
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: