mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Decode the field separator and quote char if needed.
This commit is contained in:
parent
8cc1a007b5
commit
4568fe22f7
@ -822,6 +822,18 @@ WHERE
|
||||
else:
|
||||
quote = csv.QUOTE_NONE
|
||||
|
||||
if hasattr(str, 'decode'):
|
||||
# Decode the field_separator
|
||||
try:
|
||||
field_separator = field_separator.decode('utf-8')
|
||||
except:
|
||||
pass
|
||||
# Decode the quote_char
|
||||
try:
|
||||
quote_char = quote_char.decode('utf-8')
|
||||
except:
|
||||
pass
|
||||
|
||||
csv_writer = csv.DictWriter(
|
||||
res_io, fieldnames=header, delimiter=field_separator,
|
||||
quoting=quote,
|
||||
|
Loading…
Reference in New Issue
Block a user