Re: Proper display of special latin1 characters in Powershell / MySql client ?
Posted by: Abraham Guyt
Date: April 01, 2011 06:59AM

Yes, I completely can follow and agree to what your saying.

To my understanding both under Vista and Windows7 you can change the codepage of the windows command prompt (and also powershell) with the command:

chcp 65001

(and back to latin1 with the commandL: chcp 1252)

This works, as the command prompt after that statement is able to properly display UTF8 textfiles containing e.g. the e-acute and euro symbols.

But for some reason this does not work in conjunction with the mysql cli client when it tries to return a single 2 byte UTF8 character to the shell. This is weird, because the command prompt CAN display UTF8 from textfiles with e.g. 'type file.txt'. So in theory there is no reason why it shouldn't work with the mysql cli client.

When I make a dump to a file with mysqldump containg 2 byte UTF8 characters, I can display the resulting file properly using the command prompt PROVIDED the UTF BOM bytes are in place at the beginning of the file (which I normally have to do by just opening the mysqldump produced file in notepad, and saving it immediately again without changing anything - the BOM bytes are written correctly then).

Let's hope someone comes up with the clue - it seems to be just the connection between the UTF8 enabled windows shell (with unicode font) and the mysql cli client that plays up.

Thanks for replying anyway.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

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.