FTP用户名中的非拉丁字符 [英] Non-Latin characters in username for FTP

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

问题描述

我试图找到FTP用户名中允许使用的字符列表,但RFC并不是很具体。什么ftp服务器和客户端支持Unicode中的用户名?特殊字符?是否有一个通用规范解释了FTP用户名允许的字符列表? (谷歌搜索对我没有帮助)

解决方案

RFC 959 5.3.2:

 < username> :: =< string> 
< string> :: =< char> | <炭><串GT;
< char> :: =除< CR>以外的任何128个ASCII字符和< LF>

后来的RFC(如建议的标准 RFC 3659 )讨论UTF-8扩展,但仅限于路径名和文件内容编码。

<所以你只能依赖ASCII,但我怀疑实际上大多数客户端和服务器都支持UTF-8。


I tried to find the list of characters allowed in username for FTP but the RFC is not very specific. What ftp servers and clients support user names in Unicode? Special characters? Is there a generally accepted spec that explains the list of characters allowed in FTP usernames? (googling was of no help to me)

解决方案

RFC 959 5.3.2:

<username> ::= <string>
<string> ::= <char> | <char><string>
<char> ::= any of the 128 ASCII characters except <CR> and <LF>

Later RFCs (like proposed standard RFC 3659) talk about UTF-8 extensions, but only in the context of pathnames and file contents encoding.

So you can only depend on ASCII, but I suspect in practice most clients and servers support UTF-8.

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

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