putty不在串行连接上打印utf-8字符

时间:2014-08-18 08:01:49

标签: utf-8 locale putty

我使用串行连接访问beagleboard的串口。 beagleboard上的rootfs正在使用busybox。 我已经在putty中设置了encoding = utf-8。 当我在屏幕上粘贴中文字符时,它们会被转换为“?”但是ls正确显示。 例如,我在屏幕上粘贴ls技术笔记。

Linux#> ls ????

技术笔记

我想知道为什么汉字被转换为“??”在腻子窗口复印粘贴。

当我使用putty通过SSH连接到其他Linux机器时,没有问题,并且字符在putty窗口中正确显示。

编辑1: 复制粘贴第一个字符,技术,putty生成正确的utf-8代码并将其发送到串行端口。 我在tty图层添加了printk来打印由tty图层接收的十六进制字符。

Linux#>
[ 0][  220.604000] e68a
[ 0][  220.608000] 80?d
-/bin/sh: 技: not found

e6 8a 80是对应于技术的utf-8代码。

1 个答案:

答案 0 :(得分:0)

* NIX:

... install locale

locale-gen

dpkg-reconfigure locales

PuTTY>设置>窗口>字体设置>字体>变化...