Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图找到 FTP 用户名中允许的字符列表,但 RFC 不是很具体。哪些 ftp 服务器和客户端支持 Unicode 格式的用户名?特殊的角色?是否有一个普遍接受的规范来解释 FTP 用户名中允许的字符列表?(谷歌搜索对我没有帮助)
尝试使用编码,UTF-8因为大多数 FTP 服务器将使用 UTF-8。
UTF-8
RFC 959 5.3.2:
<username> ::= <string> <string> ::= <char> | <char><string> <char> ::= any of the 128 ASCII characters except <CR> and <LF>
后来的 RFC(如提议的标准RFC 3659)谈论 UTF-8 扩展,但仅在路径名和文件内容编码的上下文中。
所以你只能依赖 ASCII,但我怀疑实际上大多数客户端和服务器都支持 UTF-8。