问题描述:
1.下载下来压缩包解压之后,文件名出现乱码,文件内容是正常的
-rw-rw-r-- 1 kql kql 39085 12月 16 2019 10.·???D???1é.ipynb
-rw-rw-r-- 1 kql kql 6205 12月 16 2019 13.mnistêy?Yê?±e?òμ¥3ìDò.ipynb
-rw-rw-r-- 1 kql kql 6322 12月 16 2019 15.mnistêy?Yê?±e-??2?ì?.ipynb
-rw-rw-r-- 1 kql kql 7895 12月 16 2019 17.mnistêy?Yê?±e-2?ó?Dropout.ipynb
-rw-rw-r-- 1 kql kql 7855 12月 16 2019 17.mnistêy?Yê?±e-Dropout.ipynb
-rw-rw-r-- 1 kql kql 7939 12月 16 2019 17.mnistêy?Yê?±e-?y?ò?ˉ.ipynb
-rw-rw-r-- 1 kql kql 6630 12月 16 2019 18.mnistêy?Yê?±e-Adamó??ˉ?÷.ipynb
-rw-rw-r-- 1 kql kql 8331 12月 26 2019 23.mnistêy?Yê?±e-?í?yé??-í???.ipynb
-rw-rw-r-- 1 kql kql 7945 12月 26 2019 28.mnistêy?Yê?±e-LSTM.ipynb
-rw-rw-r-- 1 kql kql 5988 12月 26 2019 29.?£Dí±£′?.ipynb
-rw-rw-r-- 1 kql kql 5832 12月 26 2019 29.?£Dí??è?.ipynb
drwx------ 3 kql kql 0 6月 4 2020 30-31í???ê?±e/
-rw-rw-r-- 1 kql kql 3653 12月 7 2019 3.tensorμ?ê?D?.ipynb
-rw-rw-r-- 1 kql kql 8179 12月 7 2019 4.êy?Yéú3é.ipynb
-rw-rw-r-- 1 kql kql 8983 12月 7 2019 5.?ù±?????2ù×÷1.ipynb
-rw-rw-r-- 1 kql kql 4741 12月 7 2019 6.?ù±?????2ù×÷2.ipynb
-rw-rw-r-- 1 kql kql 3473 12月 7 2019 7.êy?Yμ??÷òy.ipynb
-rw-rw-r-- 1 kql kql 4576 12月 7 2019 8.×??ˉ?óμ?.ipynb
-rw-rw-r-- 1 kql kql 30487 12月 14 2019 9.??D???1é.ipynb
2.原文件名的编码也是utf8......
? ?执行convmv -r -f gbk -t utf8 *? 文件名转换之前的测试(这里预判文件名为gbk编码)
? ?结果,文件名也是utf-8的,具体原因不知,有可能是en_us.utf8和zh_cn.utf8的区别,
? 系统默认使用的en_us.utf8字符集
????????Skipping, already UTF-8......
$ convmv -r -f gbk -t utf8 *
Starting a dry run without changes...
Skipping, already UTF-8: ./10.·???D???1é.ipynb
Skipping, already UTF-8: ./13.mnistêy?Yê?±e?òμ¥3ìDò.ipynb
Skipping, already UTF-8: ./15.mnistêy?Yê?±e-??2?ì?.ipynb
Skipping, already UTF-8: ./17.mnistêy?Yê?±e-2?ó?Dropout.ipynb
Skipping, already UTF-8: ./17.mnistêy?Yê?±e-Dropout.ipynb
Skipping, already UTF-8: ./17.mnistêy?Yê?±e-?y?ò?ˉ.ipynb
Skipping, already UTF-8: ./18.mnistêy?Yê?±e-Adamó??ˉ?÷.ipynb
Skipping, already UTF-8: ./23.mnistêy?Yê?±e-?í?yé??-í???.ipynb
Skipping, already UTF-8: ./28.mnistêy?Yê?±e-LSTM.ipynb
Skipping, already UTF-8: ./29.?£Dí±£′?.ipynb
Skipping, already UTF-8: ./29.?£Dí??è?.ipynb
Skipping, already UTF-8: 30-31í???ê?±e/30.????êμ??-?¨1··?àà_cnn.ipynb
Skipping, already UTF-8: 30-31í???ê?±e/30.????êμ??-?¨1··?àà_fc.ipynb
Skipping, already UTF-8: 30-31í???ê?±e/31.????êμ??-?¨1··?àà?¤2a3ìDò.ipynb
Skipping, already UTF-8: ./30-31í???ê?±e
Skipping, already UTF-8: ./3.tensorμ?ê?D?.ipynb
Skipping, already UTF-8: ./4.êy?Yéú3é.ipynb
Skipping, already UTF-8: ./5.?ù±?????2ù×÷1.ipynb
Skipping, already UTF-8: ./6.?ù±?????2ù×÷2.ipynb
Skipping, already UTF-8: ./7.êy?Yμ??÷òy.ipynb
Skipping, already UTF-8: ./8.×??ˉ?óμ?.ipynb
Skipping, already UTF-8: ./9.??D???1é.ipynb
No changes to your files done. Would have converted 0 files in 0 seconds.
Use --notest to finally rename the files.
解决:
首先,安装一下文件名编码转换工具convmv
? ? ? ? ?sudo apt install convmv
第一步,先把文件名从utf8转换到iso88591
? ? ? ? ? ? ? ? 执行:convmv -r -f utf8 -t iso88591 * --notest?
$ convmv -r -f utf8 -t iso88591 * --notest
mv "./10.·???D???1é.ipynb" "./10.�����??�.ipynb"
mv "./13.mnistêy?Yê?±e?òμ¥3ìDò.ipynb" "./13.mnist����?������.ipynb"
mv "./15.mnistêy?Yê?±e-??2?ì?.ipynb" "./15.mnist����?��-������.ipynb"
mv "./17.mnistêy?Yê?±e-2?ó?Dropout.ipynb" "./17.mnist����?��-����Dropout.ipynb"
mv "./17.mnistêy?Yê?±e-Dropout.ipynb" "./17.mnist����?��-Dropout.ipynb"
mv "./17.mnistêy?Yê?±e-?y?ò?ˉ.ipynb" "./17.mnist����?��-������.ipynb"
mv "./18.mnistêy?Yê?±e-Adamó??ˉ?÷.ipynb" "./18.mnist����?��-Adam�?���.ipynb"
mv "./23.mnistêy?Yê?±e-?í?yé??-í???.ipynb" "./23.mnist����?��-������������.ipynb"
mv "./28.mnistêy?Yê?±e-LSTM.ipynb" "./28.mnist����?��-LSTM.ipynb"
mv "./29.?£Dí±£′?.ipynb" "./29.?�?���.ipynb"
mv "./29.?£Dí??è?.ipynb" "./29.?������.ipynb"
mv "30-31í???ê?±e/30.????êμ??-?¨1··?àà_cnn.ipynb" "30-31í???ê?±e/30.��???-è������_cnn.ipynb"
mv "30-31í???ê?±e/30.????êμ??-?¨1··?àà_fc.ipynb" "30-31í???ê?±e/30.��???-è������_fc.ipynb"
mv "30-31í???ê?±e/31.????êμ??-?¨1··?àà?¤2a3ìDò.ipynb" "30-31í???ê?±e/31.��???-è������?������.ipynb"
mv "./30-31í???ê?±e" "./30-31?��?��"
mv "./3.tensorμ?ê?D?.ipynb" "./3.tensor������.ipynb"
mv "./4.êy?Yéú3é.ipynb" "./4.��������.ipynb"
mv "./5.?ù±?????2ù×÷1.ipynb" "./5.������������1.ipynb"
mv "./6.?ù±?????2ù×÷2.ipynb" "./6.������������2.ipynb"
mv "./7.êy?Yμ??÷òy.ipynb" "./7.���?�����.ipynb"
mv "./8.×??ˉ?óμ?.ipynb" "./8.�?�����.ipynb"
mv "./9.??D???1é.ipynb" "./9.���??�.ipynb"
Ready! I converted 22 files in 0 seconds.
第二步,从gbk转换到utf8,执行:convmv -r -f gbk -t utf8 * --notest
$ convmv -r -f gbk -t utf8 * --notest
mv "./10.�����??�.ipynb" "./10.非线性回归.ipynb"
mv "./13.mnist����?������.ipynb" "./13.mnist数据识别简单程序.ipynb"
mv "./15.mnist����?��-������.ipynb" "./15.mnist数据识别-交叉熵.ipynb"
mv "./17.mnist����?��-����Dropout.ipynb" "./17.mnist数据识别-不用Dropout.ipynb"
mv "./17.mnist����?��-Dropout.ipynb" "./17.mnist数据识别-Dropout.ipynb"
mv "./17.mnist����?��-������.ipynb" "./17.mnist数据识别-正则化.ipynb"
mv "./18.mnist����?��-Adam�?���.ipynb" "./18.mnist数据识别-Adam优化器.ipynb"
mv "./23.mnist����?��-������������.ipynb" "./23.mnist数据识别-卷积神经网络.ipynb"
mv "./28.mnist����?��-LSTM.ipynb" "./28.mnist数据识别-LSTM.ipynb"
mv "./29.?������.ipynb" "./29.模型载入.ipynb"
mv "./29.?�?���.ipynb" "./29.模型保存.ipynb"
mv "30-31?��?��/30.��???-è������_cnn.ipynb" "30-31?��?��/30.项目实战-猫狗分类_cnn.ipynb"
mv "30-31?��?��/30.��???-è������_fc.ipynb" "30-31?��?��/30.项目实战-猫狗分类_fc.ipynb"
mv "30-31?��?��/31.��???-è������?������.ipynb" "30-31?��?��/31.项目实战-猫狗分类预测程序.ipynb"
mv "./30-31?��?��" "./30-31图像识别"
mv "./3.tensor������.ipynb" "./3.tensor的属性.ipynb"
mv "./4.��������.ipynb" "./4.数据生成.ipynb"
mv "./5.������������1.ipynb" "./5.基本运算操作1.ipynb"
mv "./6.������������2.ipynb" "./6.基本运算操作2.ipynb"
mv "./7.���?�����.ipynb" "./7.数据的索引.ipynb"
mv "./8.�?�����.ipynb" "./8.自动求导.ipynb"
mv "./9.���??�.ipynb" "./9.线性回归.ipynb"
Ready! I converted 22 files in 0 seconds.
然后,看到国语汉字就舒服了。
|