Ubuntu Server中的Unicode字符


10

我最近从Ubuntu Desktop 13.04迁移到Ubuntu Server 13.10,现在我的文件系统似乎不支持Unicode字符。我使用rsync备份/同步文件,它显示正确的字符,但是它想删除不匹配的文件名并创建转义版本。

例如:

root@ubuntu-server:~# rsync -avh --progress --delete --dry-run --exclude \$RECYCLE.BIN /media/source/ /media/target/

deleting Tiësto - Ten Seconds Before Sunrise.mp3
Ti\#353sto - Ten Seconds Before Sunrise.mp3

另外,如果我将unicode文件复制到文件系统,它将显示为:

drwxr-xr-x 3 root root      4096 Jan 21  2013 DJ Ti?sto/

我尝试通过安装unicode库,apt-get install unicode但就解决问题而言似乎没有做任何事情。

更新:现在这可能是内核问题。我正在通过samba / cifs复制,我尝试通过指定utf8字符集,mount -t cifs //192.xxx.xxx.xxx/source/ /media/target/ -o iocharset=utf8但这会产生错误...

mount error(79): Can not access a needed shared library
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

检查内核日志显示了这个小瑰宝:

root@ubuntu-server:~# tail /var/log/kern.log
Nov 30 03:51:33 ubuntu-server kernel: [ 1756.518222] CIFS VFS: CIFS mount error: iocharset utf8 not found

如何在内核中获得utf8支持?

有任何想法吗?

Answers:


10

好的,经过上面的故障排除和更多的搜索之后,我发现了此错误报告,其中解释了解决方案。基本上,如果您执行Ubuntu Server最小安装,您将获得最少的驱动程序。我猜有人认为utf8不够重要,无法包含在最小的驱动程序集中。因此,如果您使用该安装类型,则需要稍后安装该linux-image-extra-virtual软件包以获得utf8支持。232 MB的其他驱动程序,支持utf8字符集...高效。:-/无论如何,这解决了问题。

root@ubuntu-server:~# apt-get install linux-image-extra-virtual
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
    crda iw libnl-3-200 libnl-genl-3-200 linux-firmware linux-image-3.11.0-13-generic
    linux-image-extra-3.11.0-13-generic linux-image-generic wireless-regdb
The following NEW packages will be installed:
    crda iw libnl-3-200 libnl-genl-3-200 linux-firmware linux-image-3.11.0-13-generic
    linux-image-extra-3.11.0-13-generic linux-image-extra-virtual
    linux-image-generic wireless-regdb
0 upgraded, 10 newly installed, 0 to remove and 12 not upgraded.
Need to get 73.5 MB of archives.
After this operation, 232 MB of additional disk space will be used.

测试utf8文件副本:

root@ubuntu-server:~# cp -a /media/source/DJ* /media/target/.

然后检查:

root@ubuntu-server:~# ll
drwxr-xr-x 3 root root      4096 Jan 21  2013 DJ Tiësto/

更新(2/22/2015):

如果使用--no-install-recommends参数,则可以减轻安装负担apt-get我没有尝试过,但是如果您遇到此问题,也许可以

您可以尝试:

apt-get install --no-install-recommends linux-image-extra-virtual

如果仍不能解决问题,请重新安装,但建议使用:

apt-get install --reinstall linux-image-extra-virtual

这为我添加了大多数unicode字符,但是我发现有些字符仍然丢失。诸如“ Prince”之类的特殊双引号之类的内容不起作用。
thouliha
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.