You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the format_results function in the CursorWrapper class in the file base.py the rows are run through an encoding process where they are encoded to utf-8.
I am using the FreeTDS driver with this library so self.driver_needs_utf8 is always True.
I have a problem where the MSSQL database I am interfacing with contains non-utf-8 characters. I have have only read access to the database and no control over the it to make changes that would resolve this.
In order to continue using the database I have two fixes.
One:
change ling 349 from: fr.append(row.decode('utf-8'))
to: fr.append(row.encode('ISO-8859-1').decode('utf-8'))
Two:
Override the init method in the CursorWrapper to automatically set driver_needs_utf8 to be False.
Would it be possible to incorporate a way in the options for the database to either encode from the database into what the database is encoded in and then decode it to utf-8 or setting the driver_needs_utf8 to be false in some way.
The text was updated successfully, but these errors were encountered:
In the format_results function in the CursorWrapper class in the file base.py the rows are run through an encoding process where they are encoded to utf-8.
I am using the FreeTDS driver with this library so self.driver_needs_utf8 is always True.
I have a problem where the MSSQL database I am interfacing with contains non-utf-8 characters. I have have only read access to the database and no control over the it to make changes that would resolve this.
In order to continue using the database I have two fixes.
One:
change ling 349 from: fr.append(row.decode('utf-8'))
to: fr.append(row.encode('ISO-8859-1').decode('utf-8'))
Two:
Override the init method in the CursorWrapper to automatically set driver_needs_utf8 to be False.
Would it be possible to incorporate a way in the options for the database to either encode from the database into what the database is encoded in and then decode it to utf-8 or setting the driver_needs_utf8 to be false in some way.
The text was updated successfully, but these errors were encountered: