From 321279e77f0b52cf81fb1d62857eb413d19d03ca Mon Sep 17 00:00:00 2001 From: Geert De Deckere Date: Mon, 15 Sep 2014 20:34:25 +0200 Subject: [PATCH] Add meta charset in head The HTTP Content-Type header has precedence but adding a meta charset in the head helps when opening an offline (e.g. downloaded) file in the browser. Also, note that the official character set name is in uppercase. See: http://www.iana.org/assignments/character-sets/character-sets.xhtml --- _posts/05-05-01-PHP-and-UTF8.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_posts/05-05-01-PHP-and-UTF8.md b/_posts/05-05-01-PHP-and-UTF8.md index a4adcc7..5476057 100644 --- a/_posts/05-05-01-PHP-and-UTF8.md +++ b/_posts/05-05-01-PHP-and-UTF8.md @@ -109,10 +109,11 @@ $handle->execute(); // Store the result into an object that we'll output later in our HTML $result = $handle->fetchAll(\PDO::FETCH_OBJ); -header('Content-Type: text/html; charset=utf-8'); +header('Content-Type: text/html; charset=UTF-8'); ?> + UTF-8 test page