Non-Latin characters in username for FTP

风格不统一 提交于 2020-01-16 11:19:27

问题


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)


回答1:


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.




回答2:


Try to encode using UTF-8 because most FTP servers will work with UTF-8.



来源:https://stackoverflow.com/questions/3466831/non-latin-characters-in-username-for-ftp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!