Welcome to Geeklog, Anonymous Wednesday, January 08 2025 @ 05:14 pm EST
Geeklog Forums
Unicode Language
tokyoahead
Anonymous
Hi...
when using the unicode fonts, the header information is correct in the HTML, but the browsers (IE & Opera, both latest versions) do not switch to UTF-8 with automatic encoding... any idea why?
is there a setting in apache or php that overrides the header information?
Oliver
when using the unicode fonts, the header information is correct in the HTML, but the browsers (IE & Opera, both latest versions) do not switch to UTF-8 with automatic encoding... any idea why?
is there a setting in apache or php that overrides the header information?
Oliver
11
7
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If the web server sends out a proper header with a character set in it, then that takes precedence over what's in the meta http-equiv in header.thtml.
Try putting
as the very first line of header.thtml (before the DOCTYPE).
bye, Dirk
Try putting
Text Formatted Code
<?php header("Content-Type: text/html;charset={charset}"); ?>bye, Dirk
8
6
Quote
tokyoahead
Anonymous
Now thats a post that is hard to understand. I dont really know where sarcasm is in your post and where you try to help, where you point out wrong things and where the science is.
in the end, I used Dirk's recommendation and it works perfectly.
Oliver
in the end, I used Dirk's recommendation and it works perfectly.
Oliver
9
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC:
<head>
<meta http-equiv="Content-Type" content="text/html;
charset={charset}">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
Text Formatted Code
<html><head>
<meta http-equiv="Content-Type" content="text/html;
charset={charset}">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
This is, of course, utter nonsense (sorry, but it is). The DOCTYPE has to be before the opening html tag.
It doesn't matter where the {charset} is in the header.thtml - if it is there, it will be replaced with the currently selected character set. Which of course means that you have to make sure that it is set properly. The character set is usually taken from the language file, unless it doesn't have one, in which case it's taken from config.php.
bye, Dirk
9
8
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: I don't understand. I thought you said to put it above doctype and that's what I did.
Look at my post again. I've added a line of PHP code, that gets executed before the HTML is sent. It sends the character set as part of the webserver's header information, not as part of the HTML.
bye, Dirk
7
6
Quote
All times are EST. The time is now 05:14 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content