E
Erwin Moller
Hello,
I am currently creating a multi language website, including the Japanese
language (which I do not understand at all).
A little background:
- Server sends headers for content-type UTF-8:
Content-Type: text/html; charset=UTF-8
- Doctype html4 strict.
The beginning of the document looks like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
....etc
- Database (Postgres) stores all texts in UTF8.
- Scriptinglanguage: PHP5.2
- Apache 2 webserver
The problem I have is with using Japanese characters in the title of the
document.
Everywhere else on the page all Japanese characters appear just fine,
except in the title. They ALL show up as squares in the title of the
browser, meaning the browser cannot display them.
I checked with w3.org on the title element, here:
http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#h-7.4.2
where is written:
===================
Titles may contain character entities (for accented characters, special
characters, etc.), but may not contain other markup (including comments).
===================
Does this mean I cannot use Japanese characters in the title element?
I am not sure about character entities in Japanese. I thought they were
just there for charactersets that lack certain characters, and unicode
SHOULD include them all. But maybe I am wrong. Unicode can be very
confusing for simple PHP programmers. ;-)
Can anybody help me with this?
Regards,
Erwin Moller
I am currently creating a multi language website, including the Japanese
language (which I do not understand at all).
A little background:
- Server sends headers for content-type UTF-8:
Content-Type: text/html; charset=UTF-8
- Doctype html4 strict.
The beginning of the document looks like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
....etc
- Database (Postgres) stores all texts in UTF8.
- Scriptinglanguage: PHP5.2
- Apache 2 webserver
The problem I have is with using Japanese characters in the title of the
document.
Everywhere else on the page all Japanese characters appear just fine,
except in the title. They ALL show up as squares in the title of the
browser, meaning the browser cannot display them.
I checked with w3.org on the title element, here:
http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#h-7.4.2
where is written:
===================
Titles may contain character entities (for accented characters, special
characters, etc.), but may not contain other markup (including comments).
===================
Does this mean I cannot use Japanese characters in the title element?
I am not sure about character entities in Japanese. I thought they were
just there for charactersets that lack certain characters, and unicode
SHOULD include them all. But maybe I am wrong. Unicode can be very
confusing for simple PHP programmers. ;-)
Can anybody help me with this?
Regards,
Erwin Moller