[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ssh, bash and mysql, odd behaviour of polish characters (iso-8859-2)



Hi,

I am seeing odd behaviour when pasting polish characters into an ssh session 
running in an xterm (or konsole).  I haven't had to bother with charset 
issues before so my grasp of the problems is not great.

I need to be able to enter some polish characters on the command line (through 
mysql command line really).  When mysql is run in an ssh session to a Debian 
machine polish chars are being converted to the question mark.  Here's what 
I've tried so far and my observations:

I start an xterm like this:

    LC_ALL=polish xterm \
        -fn -bitstream-charter-black-i-normal--0-0-0-0-p-0-iso8859-2

If I paste the polish characters into the above xterm they display correctly.  
If I start the mysql command line client in this xterm I can paste polish 
characters into mysql without difficulty.

If from the above xterm I ssh into a debian machine (stable or unstable), and 
paste the characters into the xterm, the polish characters show up as a 
question mark.  Bash is the shell on all machines.  After an ssh the locale 
environment is not preserved but exporting LC_ALL=polish doesn't make any 
difference ... polish locale is definitely available on both machines.

In the above ssh scenario if I start up vim with "LC_ALL=polish vim" and paste 
the characters into vim, things look fine.  If I save the vim file and then 
cat it to the screen the fonts again display correctly.  So perhaps it is a 
bash issue but why then don't I have a problem locally (using bash).

If I fire up an xterm in the remote ssh seesion (through ssh X11Forwarding) I 
can paste the chars into that resulting xterm properly (that xterm still 
running bash).

If in the original ssh session I run zsh inside of bash I can then paste the 
characters into the shell and they display correctly.  However firing up the 
mysql command line client under zsh still results in ? for the polish chars.

I have tried a "normal" ssh (no options) plus ssh with the option "-e none", 
disabling escapes does not help.

Does anyone have any idea how to get the mysql client, running in bash or zsh 
over an ssh session to properly display iso-8859-2 characters?

Any help will be greatly appreciated!

Thanks
-- 
Fraser Campbell <fraser@wehave.net>                 http://www.wehave.net/
Halton Hills, Ontario, Canada                       Debian GNU/Linux



Reply to: