ISSUE-61: Character Encoding
Character Encoding
- State:
- CLOSED
- Product:
- Best Practices Document
- Raised by:
- Daniel Appelquist
- Opened on:
- 2005-11-16
- Description:
- The XML encoding is noted in the XML document, but that does not force the
character encoding itself. The authoring process, including any database
storage/ extraction or server-side compilation needs to use the relevant
encoding too. HTTP (or MIME) header take precedence in case of conflict with XML
encoding.
--
Proposed text (from Giles):
5.5.12 Character Set
Ensure that content is encoded using a character set that is known to be
supported by the target device.
Indicate in the response the character encoding being used.
5.5.12.1 What it means
As in the previous section, content should not be sent to a device if it can\'t
use it.
5.5.12.2 How to do it
The supported character encodings for a device may be obtained either from a
device profile or by examining the value of the HTTP Accept-Charset header sent
with a request. (see also the section above on determining device characteristics)
The character encoding being used in a response should be indicated using the
HTTP Content-Type header.
Example:
Content-Type: text/html; charset=utf-8
Additionally for XML documents the character encoding may be indicated in the
encoding declaration [XMLENC] although this will generally be ignored if an HTTP
Content-Type header is present.
Example:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
Encoding of the content to a desired character set is dependent on the authoring
tools being used, web server configuration and the server side scripting
technology being used (if any). For a discussion of this see [HTTP Charset]:
5.5.12.3 References and Sources
XMLENC XML Character Encoding
http://www.w3.org/TR/2004/REC-xml-20040204/#charencoding
HTTP Charset http://www.w3.org/International/O-HTTP-charset
- Related Actions Items:
- No related actions
- Related emails:
- [minutes] Thu 17 November teleconference (from dom@w3.org on 2005-11-22)
- ISSUE-61: Character Encoding (from dean+cgi@w3.org on 2005-11-16)
Related notes:
Resolved on 17-Nov-05 to add text as per Giles\'s suggestion. Issue will be
closed when text has been added.
Display change log