Forum Moderators: open
I'm ploughing through the mindnumbingly complex issues of character enconding yadda yadda and I'm putting together the Korean test page but it's made even more complicated by the way I serve the headers. Basically, all my pages use the .xhtml extension but I serve the html/text MIME type. In order to make changes to this in the future very easy, the headers are called on each page by a PHP include to a single small file that contains the header information... and that looks like this for the Korean test page...
<?php
$charset = "euc-kr";
$mime = "text/html";
header("Content-Type: $mime;charset=$charset");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko">
... How does this look? Is there anything I've left out, or need to be aware of?
Warning: Cannot modify header information - headers already sent by (output started at /homepages/yadda/yadda/my-korean-page.xhtml:1) in /homepages/yadda/yadda/my-korean-page.php on line 4
I also noticed that even though the doctype declaration is making it and being rendered in the page, the w3 validator says there's no doctype found.
What does all this mean? What on Earth am I doing wrong here?!
.xhtml extension
xhtml11.dtd
I'm a part time webmaster but my website is starting to take off in my sector. A major travel guide print publisher is about to run full page print ads in their Japan and Malaysia guides and it's something that could really make my website... but until such time, I don't have the resources to make mistake after mistake. I know I can learn from mistakes but what I really need is someone to tell me what to do because I can't see the fire for the smoke.
I don't want to get into a debate over the pros and cons of serving XHTML with the text/html MIME type but that's the route I've chosen and I hope in years to come the standard will be adopted. If not, I've got a lot of work to do to reverse my decision. If all I need to do is change the MIME type in the future, it's all in an include and I can change the lot in minutes.
Regardless, I'm having big problems understanding the language issues and I can't get these Korean pages to work properly. If I save in Unicode, the PHP includes won't work. If I save in UTF-8, Firefox won't display the characters properly. I've I save in ANSI, Korean is just question marks... I need someone to draw me a picture because I'll be f#$%&^d if I can work it out this time.
I don't want to get into a debate over the pros and cons of serving XHTML with the text/html MIME type but that's the route I've chosen and I hope in years to come the standard will be adopted.
XHTML 1.1 was never an upgrade from 1.0. A lot of people made that mistake. The XHTML 1.1 route has pretty much been abandoned by most web developers as it's problematic. If you're going to use that standard then you've really got to know what you're doing. It's not for the semi-pro.
language issues
that's the route I've chosen and I hope in years to come the standard will be adopted.