| Issue 304: | access chinese filename connect? | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem? 1.how to connect when connect string having chinese?
Mar 28, 2013
Project Member
#1
mkleehammer
Status:
Investigating
Sep 26, 2014
solution: assume you have a connect string 'connect_str' with chinese characters,the following example should work. import locale, pyodbc connection = pyodbc.connect(connect_str.decode(locale.getpreferredencoding()))
Sep 26, 2014
or you can try: import locale, sys connection = pyodbc.connect(connect_str.decode(sys.getfilesystemencoding())) |