W3C home > Mailing lists > Public > www-international@w3.org > January to March 2014

Comment on Declaring Character Encodings

From: Karl Groves <kgroves@paciellogroup.com>
Date: Fri, 28 Feb 2014 10:38:56 -0500
Message-ID: <CABScKPAsBcXhkWuwzwU19Bb2Gwa0r-+5tUB0Sc79zMNyvCADDg@mail.gmail.com>
To: www-international@w3.org
This comment relates to:

There are several considerations when it comes to setting character
encodings in a PHP application that are likely to render your example of
using header() ineffective. By default, PHP < 5.6.0 and MySQL are both set
to ISO-8859-1.  Setting the charset using header() would only address one
piece of the puzzle. Instances where PHP's encoding differs from the
database's encoding are likely to create issues as well.

It probably would be out of scope for your document to discuss all of the
necessary details with regard to PHP, so perhaps a brief note and a link to
PHP's documentation would be useful:
http://php.net/manual/en/refs.international.php and
http://www.php.net/manual/en/book.mbstring.php should do.

Chances are similar documentation exists for other server-side languages.

Finally, I think the parenthetical mention about actually saving the
file(s) and content as utf-8 needs more prominence: "(Remember that this
means you also need to *save* your content as UTF-8.)"

This is very important, as a file saved as something else (like Microsoft's
god-awful Windows-1252) may cause problems.


Karl Groves
Senior Technical Lead Accessibility Software Consultant & Director of
The Paciello Group
Phone: +1 443-875-7343

The Paciello Group.
Received on Friday, 28 February 2014 16:25:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:04 UTC