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

@ -26,6 +26,7 @@ Bug fixes
*********
| `Issue #2813 <https://redmine.postgresql.org/issues/2813>`_ - Ensure that the password prompt should not be visible if the database server is in trust authentication mode.
| `Issue #3495 <https://redmine.postgresql.org/issues/3495>`_ - Fixed an issue where the query tool unable to load the file which contains the BOM marker.
| `Issue #3523 <https://redmine.postgresql.org/issues/3523>`_ - Fixed an issue where right-clicking a browser object does not apply to the object on which right-click was fired.
| `Issue #3645 <https://redmine.postgresql.org/issues/3645>`_ - Ensure that the start and end date should be deleted when clear the selection for pgAgent Job.
| `Issue #3947 <https://redmine.postgresql.org/issues/3947>`_ - Fixed copy-paste row issues in View/Edit Data.

View File

@ -1089,6 +1089,9 @@ class Filemanager(object):
is_startswith_bom = True
enc = encoding
# 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)