Proper display of special latin1 characters in Powershell / MySql client ?
Posted by: Abraham Guyt
Date: March 24, 2011 06:00PM

Hi all,

For a long time I've been hitting the wall with an issue of not being able to display special latin1 characters (e.g. ë, €) while using the mysql client in the Windows Powershell (or ms command prompt - same issue). Hope anyone knows what goes wrong here ? :-)

The situation:
- latin1 database + latin1 table containg special characters (e.g. ë, €)
- powershell v2 using Lucida font (capable of displaying ë, €)
- code page changed to UTF8 (using 'chcp 65001')
- mysql cli client connected to database
- issued 'set names utf8'

Now when a query to display special latin1 data is submitted, the result characters are NOT displayed properly, though the data itself is totally OK (confirmed using other tools like MySQL query, etc.).

When a dump is made using mysqldump using utf8 directly to the screen, the characters display OK (all using the same powershell, code page, etc.).

When the same query is done from a linux box Bash shell, all characters are OK as well.

So it's only the mysql cli client playing up with wrong display of these special latin1 characters. Changing the shell's code page to 1252 and 'set names latin1' solves the problem, but that's not how it should work. The special characters should be translated 'live' to UTF8 and displayed as UTF8 in the UTF8 enabled powershell.

Any ideas what goes wrong here ? I cannot emphasise enough that the database data and its definition are totally fine; all special character treatment works well in all clients (.NET / PHP / MySql tools) EXCEPT the mysql cli client.

Googled all over the place, but no answer so far :-)



Edited 1 time(s). Last edit at 03/24/2011 06:01PM by Abraham Guyt.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.