Closed nemeth-it closed 6 years ago
Could you provide an screenshot example of the output when you run the query on your cli?
Also, an screenshot of the SQLTools result would be great! Than we can eliminate some hypothesis, ok?
Thank you @inovek!
There might be multiple places where wrong encoding can creep in (multiple mysql connection encoding settings, mysql command output encoding). SQLTools uses python decode method to decode the output of mysql command line. The full list of python encodings listed here: https://docs.python.org/3/library/codecs.html#standard-encodings
I've noticed you refer to "cp1251" and "windows-1252" which are two different encodings. Probably you meant "cp1252"?? Both "cp1251" and "windows-1252" seem to be valid python encodings.
I will try to reproduce your issue.
I think I have a fix for your problem. Please wait for a new release soon and test it out to see if that fixed your problem. Issue may be related to #158
In new release, which is going to be released very soon there will be a configurable Connection option called default-character-set
, that allows you to specify the encoding of MySQL connection which is recommended to set to utf8mb4
for MySQL 5.5.3 or newer and utf8
for MySQL 5.5.2 or older.
Example:
{ "connections": { "Connection MySQL": { "type" : "mysql", "host" : "127.0.0.1", "port" : 3306, "database": "dbname", "username": "user", "password": "password", "default-character-set": "utf8", "encoding": "utf-8" } } }
@inovek
The fix via additional connection option default-character-set
is already available in new release.
Please test and close the issue, if that solves your problem.
### DESCRIPTION ### I've old database tables here which are encoded in Western Europe (cp1251). When I execute an query I recognized that all Umlauts and other special character are replaced with an question-mark-charackter "?".
Example Result: T?r, T?r hinten links mit Scharnier Wanted Result: Tür, Tür hinten links mit Scharnier
This is clearly an Encoding-Issue, so I tried to replace the encoding-settings under the connection-templates with "cp1251", also tried "windows-1252" but the results doesn't changed.
What did I wrong? Is "cp1251" or "windows-1252" the wrong encoding-identifier/names or do I've to change the encoding for SQLTools because of our tables somewhere else, too?
### ENVIRONMENT ### MacOS Siera (current), MariaDB via Homebrew (current), SQL Tools (current) SQL-Tools connected to (remote) a test-mySQL-server of our local network