Ensure that utf-8 is tested when importing fits
This commit is contained in:
@@ -867,7 +867,7 @@ class Fit(object):
|
|||||||
|
|
||||||
if codec_found is None:
|
if codec_found is None:
|
||||||
logger.warn("Unicode BOM not found in file %s.", path)
|
logger.warn("Unicode BOM not found in file %s.", path)
|
||||||
attempt_codecs = (defcodepage, "utf-16", "cp1252")
|
attempt_codecs = (defcodepage, "utf-8", "utf-16", "cp1252")
|
||||||
for page in attempt_codecs:
|
for page in attempt_codecs:
|
||||||
try:
|
try:
|
||||||
logger.warn("Attempting to decode file %s using %s page.", path, page)
|
logger.warn("Attempting to decode file %s using %s page.", path, page)
|
||||||
|
|||||||
Reference in New Issue
Block a user