I am using a serial connection to access the serial port of beagleboard.
The rootfs on beagleboard is using busybox.
I have already set encoding=utf-8 in putty.
When I paste Chinese characters on screen they are converted to "?" but ls is showing correctly.
For example I paste ls 技术笔记 on screen.
Linux#> ls ????
技术笔记
I wonder why Chinese characters are converted to "??" on copy pasting in putty window.
When I connect to other Linux machine using putty via SSH, there is no problem and the characters are displayed correctly on putty window.
Edit 1:
copy pasting the 1st character, 技, putty generates correct utf-8 code and send it to serial port.
I added printk at the tty layer to print the hexadecimal character received by the tty layer.
Linux#>
[ 0][ 220.604000] e68a
[ 0][ 220.608000] 80?d
-/bin/sh: 技: not found
e6 8a 80 is the utf-8 code corresponding to 技.
*NIX:
... install locale
locale-gen
dpkg-reconfigure locales
PuTTY > Settings > Window > Font settings > Font > Change...
Related
I have configured a telnet server in a Windows Server 2008 Host Computer.
(I use W2008 because I'm running a 16 bit DOS application, and only Windows 2008 made its installation successful)
I successfully connected to the server via my Windows 10 telnet client.
But when I want to change the keyboard language in french (AZERTY), I use this command:
kb16 fr
It works well.
To understand what is kb16: MS-DOS and Windows command line keyb command [Computer Hope]
But it suddenly changed the style of the command prompt, and I saw that it's no more CMD.EXE style but COMMAND.COM style.
Here a screenshot:
So why is that a problem to me? With AZERTY, I need to use Alt Gr touch for example to have the backslash (Alt Gr 8). But when I try Alt Gr 8 on that COMMAND.COM, it gives me _.
Even ALT+92 command doesn't work.
Do you know how to fix this?
EDIT:
I'm opening Windows Server 2008 with VirtualBox, and it's hosting my telnet server. The COMMAND.COM comes from that Windows Server 2008. I don't know why but there are two types of Command Prompt, see this screen:
And I tried your command, the EXIT command worked ! Here the screen:
EDIT 2:
I tried the chcp command.
My code is 850. So I do chcp 850 to set the page code to 850.
When I do exit and I write chcp
The COMMAND.COM is indeed set to page code 850.
So I can \\\\ in the COMMAND.COM. But when I run my 16-bit DOS application, it doesn't take effect.
But I ran a Windows 10 32 bits server and run my 16-bit application, and I meet no problems with the \ when I put ALT+92.
So it should normally work...
I have a file which shows different things in Notepad and Vim.
The file displays normally under Windows Notepad:
Strange character are added to each character when using Vim.
Anyone know how to dismiss those strange character in Vim under Windows environment?
As you can see: TSS is displayed as T^#S^#S^#(binary: 54 00 53 00 53 00).
Because vim shows \0x00 as ^#. It sounds like UTF16LE.
You can convert UTF16LE to UTF8:
:e ++enc=UTF16LE
:set fenc=UTF8
:w
That looks like unicode. You can open the file in notepad and save it as ascii.
Alternatively, if you don't want to create a new file, you can change your vimrc settings to enable multi-byte character encoding.
Here's more information from the vim wiki:
http://vim.wikia.com/wiki/Working_with_Unicode
The file is stored as UTF-16, where each character is represented by two bytes. VIM opens it as if it was an ASCII or UTF-8 file, so each pair of bytes is turned into two characters.
Notepad recognises the encoding, but apparently VIM doesn't. Specify the encoding when you open the file.
The text will be mis-aligned if displayed in windows prompt directly.
Is there a module for converting vt100 format so that it can display normally in windows?
UPDATE
Environment:
client: telnet from windows prompt
server: unix
I put files in the FTP server using my Macintosh Terminal. I use the command
"PUT filename.txt"
while doing this the text file which is an UTF-16 gets to the ftp server but do not retain the DoubleByte characters (E.g: Japanese Characters). I believe this is because I did not specify a file format for destination.
What is the command to be used to specify the Destination "File Format" "Type", "Structure" etc.
The default FTP type is ascii. Before you PUT your file, you might first change your type to binary.
Here is how it looks at my prompt:
ftp> binary
200 Type set to I
I used BBEdit to save the file as UTF-8 and then sent the file to the server. This worked fine.
BBEdit gave me the option to save the file as UTF-8 Unix format. When i used Excel, Access or anyother software which do not have UTF-8 unix format (they have UTF-8 Windows) as saving, the text file is getting issues . Unix gets crazy with non english characters with UTF-8 Windows encoding.
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...
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.
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>