user141521
user141521

Reputation:

PLINK change character set translation to UTF-8 (utf8)

Does anyone know how to configure the character set translation on plink (the command line version of Putty) to UTF-8? I'm trying to SSH to a Linux server whose character set configuration is UTF-8.

This can be easily achieved via Putty, but I can't seem to find that command line option on Plink...

Upvotes: 1

Views: 11796

Answers (2)

fondor
fondor

Reputation: 153

You could also configure a PuTTY session as desired and load it via plink:

plink.exe -load my_session -l my_user_name -pw my_password <your command>

Upvotes: 2

Daniel Martin
Daniel Martin

Reputation: 23548

You can't find an option because plink doesn't do the character set translation - that's handled by the windows command window. To change the windows command window's character set translation before you start plink use the command "chcp".

To get utf-8, you'll need to first change the console window's font to "Lucida Console". Then, try "chcp 65001".

One caveat - I've found that there's something incredibly slow and inefficient about the windows console when it's doing utf-8 such that if you send data too quickly, plink will blow up and say "A device attached to the system is not functioning".

However, I have to ask - why are you doing this? You should be using putty for anything interactive and for anything non-interactive, if you're redirecting output into a file the translation that the windows console has in effect at the time doesn't matter. The file is then in utf-8, and whatever windows program you're opening it in needs to be told that.

Upvotes: 3

Related Questions