htmlencodingcharacter-encoding

confusion between encoding of a web document and the encoding explicitly used in the document


When you want to save a file, you do it in a certain character encoding, meaning that each character of the file fits in memory according to its encoding. right?

For example if an HTML file has utf-16 encoding, does that means that browser uses utf-16 encoding to decode the given file to read the source code?

Does using the charset attribute in a meta element define what encoding the language (HTML) should use to properly display characters in browser?

and HTML added an "HTML character reference" on its own and it has nothing to do with Unicode character codes?


Solution

  • when you want to save a file, you do it in a certain character encoding, meaning that each character of the file fits in memory according to its encoding. right?

    for example if a html file has utf-16 encoding, does that means that browser uses utf-16 encoding to decode the given file to read the source code?

    does using charset attribute in meta element defines what encoding the language(html) should use to properly display characters in browser?

    and html added an "html character reference"on its own and it has nothing to do with unicode character codes?