Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Adding a BOM so excel can open downloads properly
Browse files Browse the repository at this point in the history
  • Loading branch information
vegitron committed Jan 25, 2017
1 parent 4b0af8d commit 7c78b55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sqlshare_rest/views/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from sqlshare_rest.util.query import frontend_description_from_cursor
from sqlshare_rest.dao.user import get_user
from sqlshare_rest.logger import getLogger
import codecs
import json
import re

Expand Down Expand Up @@ -55,6 +56,7 @@ def stream_query(cursor, user):

names = ",".join(list(map(lambda x: csv_encode(x["name"]), columns)))

yield codecs.BOM_UTF8
yield names
yield "\n"

Expand Down

0 comments on commit 7c78b55

Please sign in to comment.