Welcome to Geeklog, Anonymous Sunday, May 26 2024 @ 10:19 pm EDT

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
 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
Text Formatted Code
<?php header("Content-Type: text/html;charset={charset}"); ?>
 
as the very first line of header.thtml (before the DOCTYPE).

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
I deleted my post as it was irrelevant. Sorry...
 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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC:
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
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
I deleted my post as it was irrelevant. Sorry...
 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
 Quote

All times are EDT. The time is now 10:19 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