Joh*_*han 7 filesystems debian utf-8
我有一台运行 Debian 稳定版的旧电脑,需要升级。问题是它对所有东西都使用 latin1 (ISO-8859-1),而且由于世界其他地方已经转移到 UTF-8,我也计划转换这台计算机。
对于这个问题,我将重点关注与 Samba 一起提供的文件,有些文件名中包含一些 latin1 字符(如 åäö)。
现在我的计划是将这台旧计算机的所有数据移到一台运行 Debian stable(但使用 UTF-8)的全新计算机上。
有人有什么好主意吗?
注意:稍后我计划使用iconv以下内容来转换某些文件的内容:
iconv --from-code=ISO-8859-1 --to-code=UTF-8 iso.txt > utf.txt
Run Code Online (Sandbox Code Playgroud)
但是我不知道自己转换文件系统的好方法。
注意:通常我通常只是scp从一台计算机到另一台计算机,但后来我在 utf-8 文件系统中得到了 latin1 字符。
更新:用文件名中的文件(带有有趣的字符)进行了一次小型测试,这似乎可以工作。
convmv -r -f ISO-8859-1 -t UTF-8 *
Run Code Online (Sandbox Code Playgroud)
注意:-r=递归;-f/ -t= 从/到。
所以它只是执行 --notest
convmv -r -f ISO-8859-1 -t UTF-8 --notest *
Run Code Online (Sandbox Code Playgroud)
没有更多了。
cst*_*mas 14
使用卷积:
Package: convmv
Priority: optional
Section: utils
Installed-Size: 88
Maintainer: Raphael Zimmerer <killekulla@rdrz.de>
Architecture: all
Version: 1.12-1
Depends: perl
Filename: pool/main/c/convmv/convmv_1.12-1_all.deb
Size: 20052
MD5sum: dcc45d5b8517026f588d769d81d67768
SHA1: 55da9650cfee5c64d8a4fdf278aaf9401a5e5dec
SHA256: 0a8b0165a78dc42f7dc665a14d21c22ce0433d115fe537be2af74682d3b82a5f
Description: filename encoding conversion tool
convmv can convert a single filename, a directory tree or all files
on a filesystem to a different encoding. It only converts the
encoding of filenames, not files contents. A special feature of
convmv is that it also takes care of symlinks: the encoding of the
symlink's target will be converted if the symlink itself is being
converted.
.
It is also possible to convert directories to UTF-8 which are already
partially UTF-8 encoded.
.
Keywords: rename, move
Tag: devel::i18n, implemented-in::perl, interface::commandline, role::program, scope::utility, works-with::file
Run Code Online (Sandbox Code Playgroud)
apt-get 安装 convv
:-)
在传输文件之前遇到此页面的读者请注意:
您可以使用最近的 rsync 和 --iconv 选项进行传输:
rsync -va --iconv=utf8,iso88591 /source/latin1/ /destination/utf8
Run Code Online (Sandbox Code Playgroud)
(是的, iconv 字符集的排序并不直观!)
因为当传输已经完成时,convmv 确实是解决方案。
| 归档时间: |
|
| 查看次数: |
22552 次 |
| 最近记录: |