[Share Experiences] 关于fat32文件系统的卷标
Tofloor
poster avatar
lizipeng0013
deepin
2023-05-03 22:13
Author

在Windows设置的fat32文件系统中文卷标,Deepin上不能正常识别,英文或数字则正常

同样的,在Deepin设置fat32文件系统的中文卷标,在Windows也会乱码不能正常识别

截图_dde-desktop_20230417162347.png
截图_deepin-terminal_20230417165327.png
2023-04-17_173001.png

造成这个问题的原因,是因为Linux在处理fat32的卷标时使用utf-8编码,而Windows使用GBK编码(简体中文系统的ANSI编码)

设置fat32文件系统的卷标时,因为编码不同,Windows和Linux对长度的限制也不一样。fat32文件系统限制卷标最长11字符(11字节),utf-8最长3中文(9字节)+2英文字符(2字节),GBK最长5中文(10字节)+1英文字符(1字节)


关于磁盘管理器显示的fat32的中文卷标是特殊字符(xc4\xe2\xb4\xc5\xc5\xcc\xd3\xc3),我用Windows的Notepad++测试了一下,果然就是将Windows的GBK转成utf-8的结果:

录屏_notepad++.exe_20230503140258.gif

Reply Favorite View the author
All Replies
新手小白
deepin
2023-05-03 22:39
#1
It has been deleted!
lizipeng0013
deepin
2023-05-04 00:03
#2
新手小白 It has been deleted!

感谢您的建议

Reply View the author
hanzn-zzx
deepin
2023-05-04 00:15
#3

那可否有解决方案?

Reply View the author
lizipeng0013
deepin
2023-05-04 01:31
#4
hanzn-zzx

那可否有解决方案?

解决方案不知道

fat32一般就是U盘用,大多数人都不会设置卷标的,更别说设置中文的卷标了

反正也不影响使用

Reply View the author
hanzn-zzx
deepin
2023-05-04 02:13
#5
lizipeng0013

解决方案不知道

fat32一般就是U盘用,大多数人都不会设置卷标的,更别说设置中文的卷标了

反正也不影响使用

我就用设置了中文卷标的fat32U盘

Reply View the author
raspbian
deepin
2023-05-04 02:43
#6

现在小于4G的u盘都不好买了

别创造一个不存在的需求然后尝试解决它

没啥意义

Reply View the author
阿尼樱奈奈
deepin
2023-05-04 02:45
#7

我的小米手机的ftp传输文件名中文部分乱码也是类似情况。改一下编码格式就好了
IMG_20230503_184904.jpg

Reply View the author
vivian_me
deepin testing team
2023-05-04 23:35
#8

大概是两边不兼容

Reply View the author