http - UTF8 +转义我们的国际网址是标准的吗?

标签 http url unicode utf-8 character-encoding

我看到许多网站(亚马逊、维基百科等)在其 URL 中使用 UTF8 编码、URL 转义的 unicode,并且这些 URL(至少)经过 Chrome 美化。

例如,我们将表示 http://ja.wikipedia.org/wiki/マインページ as http://ja.wikipedia.org/wiki/%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%9A%E3%83%BC%E3%82%B8在编写我们的 http header 时,Chrome 和 Firefox 似乎以一种优雅的方式理解了这一点。 (我没有在 IE 上测试。)

是否有针对此行为的管理标准?还是严格意义上的事实标准?还是完全不规范?

我真的很想看到一些 RFC 的定义段落的链接。

最佳答案

URI standard说:

When a new URI scheme defines a component that represents textual data consisting of characters from the Universal Character Set [UCS], the data should first be encoded as octets according to the UTF-8 character encoding [STD63]; then only those octets that do not correspond to characters in the unreserved set should be percent- encoded.

这似乎很明确。

我仍然不确定它何时被批准,或者当前的浏览器支持。

关于http - UTF8 +转义我们的国际网址是标准的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9115297/

相关文章:

python - 如何使用请求使用来自 URL 的特定条目

url - 使用带有编码 URL 的 CURL 进行删除

regex - 如何对所有非 ASCII 字符进行 grep?

php - 在 PHP 中编写透明的 HTTP 代理脚本

javascript - 如何在 $resource POST 上设置请求正文和参数

node.js - 如何使用 Express API 发送 10x 响应?

jquery - 使用 Jquery.serialize() 处理日语;

python - Urllib 和并发 - Python

PHP 正则表达式 : CSS Relative to Absolute

python - UnicodeDecodeError 'utf-8' 编解码器无法解码 - 使用 python shapefile reader