某些UTF-8字符不会显示在浏览器上 [英] Some UTF-8 characters do not show up on browser
问题描述
http://stuffofinterest.com/misc/utf8.php?s=128 (请参阅代码的这个URL)
我发现这可以用html实体处理。有没有办法显示这个没有转换成html实体?
我怀疑这是因为U + 0080和包括U + 009F是控制字符。我仍然有点惊讶,它们在HTML中直接编码时显示的不同于使用实体,但基本上您不应该使用它们来开始。 U + 0096不是真的连字号,它是开始守卫区。
请参阅 U + 0080-U + 00FF代码图表了解更多信息。基本上,尽量避免控制字符...
Some UTF-8 characters like the UTF-8 equivalent of C2 96 (hyphen). On the browser it displays it as (utf box with 00 96). And not as '-'(hyphen). Any reasons for this behavior? How do we correct this?
http://stuffofinterest.com/misc/utf8.php?s=128 (Refer this URL for the codes)
I found that this can be handled with html entities. Is there any way to display this without converting to html entities?
I suspect this is because the characters between U+0080 and U+009F inclusive are control characters. I'm still slightly surprised that they show differently when encoded directly in the HTML than using entities, but basically you shouldn't be using them to start with. U+0096 isn't really "hyphen", it's "start of guarded area".
See the U+0080-U+00FF code chart for more information. Basically, try to avoid control characters...
这篇关于某些UTF-8字符不会显示在浏览器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!