文件名中允许的字符 [英] Allowed characters in filename

查看:111
本文介绍了文件名中允许的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在哪里可以找到文件名中允许使用的字符的列表,具体取决于操作系统? (例如,在Linux上,文件名中允许使用字符:,但在Windows上不允许)

Where can I find a list of allowed characters in filenames, depending on the operating system? (e.g. on Linux, the character : is allowed in filenames, but not on Windows)

推荐答案

您应该以 Wikipedia文件名页.它有一个大小合适的表(文件名限制的比较),其中列出了保留的字符很多文件系统.

You should start with the Wikipedia Filename page. It has a decent-sized table (Comparison of filename limitations), listing the reserved characters for quite a lot of file systems.

它还具有有关每个文件系统的大量 other 信息,包括保留文件名,例如MS-DOS下的CON.我之所以这么说是因为,我将包含文件从const.h缩短为con.h并花了半个小时弄清楚编译器为何挂起,才被我咬了一次.

It also has a plethora of other information about each file system, including reserved file names such as CON under MS-DOS. I mention that only because I was bitten by that once when I shortened an include file from const.h to con.h and spent half an hour figuring out why the compiler hung.

列出设备的DOS 忽略的扩展名,以使con.h与输入控制台con完全相同(当然,这意味着编译器在等我输入头文件,然后继续操作.

Turns out DOS ignored extensions for devices so that con.h was exactly the same as con, the input console (meaning, of course, the compiler was waiting for me to type in the header file before it would continue).

这篇关于文件名中允许的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆