在Android上的文件名中允许的字符是什么?文件名、字符、Android

2023-09-11 20:23:21 作者:一见你就笑

允许使用哪些特殊字符的文件名在Android?

 〜@#$%^&放大器; *()_ + / \,
 

另外,我可以保存文件的Uni code的名字?

解决方案

在Android的(至少是默认)文件名EN codeD为UTF-8。

看起来保留的文件名字符依赖于文件系统安装( http://en.wikipedia.org/wiki/Filename )。

我认为是保留的:

 私有静态最后弦乐ReservedChars =|?\\ *< \:> + [] /';
 
批量删除文件名中的指定字符

What special characters are allowed for file names on Android?

~!@#$%^&*()_+/\.,

Also, can I save file with Unicode name?

解决方案

On Android (at least by default) the file names encoded as UTF-8.

Looks like reserved file name characters depend on filesystem mounted (http://en.wikipedia.org/wiki/Filename).

I considered as reserved:

private static final String ReservedChars = "|\\?*<\":>+[]/'";