Unicode character sets & encoding in browsers

前端 未结 1 351
独厮守ぢ
独厮守ぢ 2020-12-12 03:17

I\'m trying to find out how character sets/encoding are implemented in browsers, specifically Unicode.

  1. Are sets/encodings implemented separately in each browse
相关标签:
1条回答
  • 2020-12-12 03:45

    I don't believe the browsers worry about the UCD at all.

    A wellformed page will have a charset defined for it. Example:
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />

    Any text that is being displayed will have a list of fonts defined for it (in preferred order). Example:
    p { font-family: Verdana, Arial, sans-serif; }

    For any character on the page the browser simply looks up the glyph in the font definition. If there isn't one it moves to the next font in the list. If it lucks out completely it probably just uses whatever uber-font the OS provides (Arial).

    0 讨论(0)
提交回复
热议问题