为什么问号显示在网络浏览器中? [英] Why does question mark show up in web browser?

查看:269
本文介绍了为什么问号显示在网络浏览器中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在(重新)阅读 Joel关于Unicode的精彩文章,并且遇到了这一段,我不太了解:

I was (re)reading Joel's great article on Unicode and came across this paragraph, which I didn't quite understand:

例如,您可以为Hello(U + 0048)编码Unicode字符串 U + 0065 U + 006C U + 006C U + 006F)或ASCII,或旧的OEM希腊编码, 或希伯来语ANSI编码,或数百种编码中的任何一种 到目前为止已经发明了,只有一个问题:有些字母可能 不露面!如果没有对应的Unicode代码点 您正在尝试以您要表示的编码形式表示 在它里面,您通常会得到一个问号:或者,如果您真的 好,一个盒子.你得到了什么? ->

For example, you could encode the Unicode string for Hello (U+0048 U+0065 U+006C U+006C U+006F) in ASCII, or the old OEM Greek Encoding, or the Hebrew ANSI Encoding, or any of several hundred encodings that have been invented so far, with one catch: some of the letters might not show up! If there's no equivalent for the Unicode code point you're trying to represent in the encoding you're trying to represent it in, you usually get a little question mark: ? or, if you're really good, a box. Which did you get? -> �

为什么会有问号,他的意思是或者,如果你真的很厉害,那就是盒子"?他想表现什么角色?

Why is there a question mark, and what does he mean by "or, if you're really good, a box"? And what character is he trying to display?

推荐答案

有一个问号,因为编码过程识别出编码不支持该字符,而是替换为问号.他的意思是:如果您真的很不错,那么,如果您使用的是更新的浏览器并支持正确的字体,"您将获得一个更奇特的替换字符,一个方框.

There is a question mark because the encoding process recognizes that the encoding can't support the character, and substitutes a question mark instead. By "if you're really good," he means, "if you have a newer browser and proper font support," you'll get a fancier substitution character, a box.

在Joel的情况下,他不是要显示真实字符,而是从字面上包括Unicode替换字符

In Joel's case, he isn't trying to display a real character, he literally included the Unicode replacement character, U+FFFD REPLACEMENT CHARACTER.

这篇关于为什么问号显示在网络浏览器中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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