Fixed an issue where the query tool unable to load the file which contains the BOM marker. Fixes #3495

This commit is contained in:
Murtuza Zabuawala
2020-04-17 12:40:09 +05:30
committed by Akshay Joshi
parent 0ce4f49e08
commit d35433d0b8
2 changed files with 6 additions and 2 deletions

View File

@@ -1089,8 +1089,11 @@ class Filemanager(object):
is_startswith_bom = True
enc = encoding
# Check if string is binary
is_binary = is_binary_string(file_data)
# No need to check for binary file, a BOM marker already
# indicates that text stream afterwards
if not is_startswith_bom:
# Check if string is binary
is_binary = is_binary_string(file_data)
except IOError as ex:
status = False