Skip to content

Commit 3ac165e

Browse files
author
Elliot Boschwitz
authored
Fixes string encoding issues on Python 2 (#468)
1 parent 9dcf967 commit 3ac165e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

mssqlcli/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ def run_cli_with(options):
6161
try:
6262
if six.PY2:
6363
with io.open(options.input_file, 'r', encoding='utf-8') as f:
64-
# utf-8 encoding must be called again for windows
65-
text = f.read().encode('utf-8')
64+
text = f.read()
6665
else:
6766
with open(options.input_file, 'r', encoding='utf-8') as f:
6867
text = f.read()

mssqlcli/mssql_cli.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,6 @@ def _execute_interactive_command(self, text):
368368

369369
def execute_query(self, text):
370370
""" Processes a query string and outputs to file or terminal """
371-
372-
text = str(text)
373371
if self.interactive_mode:
374372
output = self._execute_interactive_command(text)
375373
else:

0 commit comments

Comments
 (0)