Webmastersite.net
Register Log In

How To Change Character Encoding?

Comments on How To Change Character Encoding?

Jonj1611
Forum Regular

Usergroup: Customer
Joined: Aug 14, 2005

Total Topics: 33
Total Comments: 107
Posted Apr 02, 2006 - 8:41 AM:

Whenever we import javascript or anything else into our documents we find characters like ' turn into ?

After investigation we found that the site is set to Unicode(UTF-8) for the character encoding even though the actual page source says :-

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

My question is where would this problem be stemming from? We really need the site to have the correct character encoding, does anyone know where we would be able to make a change that would sort this out?

Thanks
Jon
Jonj1611
Forum Regular

Usergroup: Customer
Joined: Aug 14, 2005

Total Topics: 33
Total Comments: 107
Posted Apr 02, 2006 - 8:46 AM:

Hi,

Forgot to add correct encoding should be :-

Western (ISO-8859-1)

Thanks
Jon
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 03, 2006 - 4:07 AM:

Admin panel -> language -> find the item named charset.

If that isn't working, perhaps in end.php replace
if (!$downloading && !$rssfeed) header("Content-type: text/html");
with
if (!$downloading && !$rssfeed)
{
if ($language->charset != '') header("Content-type: text/html; charset=". $language->charset);
else header("Content-type: text/html");
}
Jonj1611
Forum Regular

Usergroup: Customer
Joined: Aug 14, 2005

Total Topics: 33
Total Comments: 107
Posted Apr 03, 2006 - 4:13 AM:

Thanks Paul, cannot find anything called charset under language, is that the exact name?

Thanks
Jon
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 03, 2006 - 4:14 AM:

It is named charset if you're running a multilingual install. Edit for correction: actually in english-only installs too it's there.

Also see my edit above.
Jonj1611
Forum Regular

Usergroup: Customer
Joined: Aug 14, 2005

Total Topics: 33
Total Comments: 107
Posted Apr 03, 2006 - 4:22 AM:

Hi Paul,

May need to try the edit as I cannot see charset under language included a screenshot, that is the right section?

http://imageheap.com/main/pic.php?u=223ZShsK&i=2914

Thanks
Jon
Jonj1611
Forum Regular

Usergroup: Customer
Joined: Aug 14, 2005

Total Topics: 33
Total Comments: 107
Posted Apr 03, 2006 - 4:32 AM:

On the bit in the code where it says header("Content-type: text/html; charset="

Do I need to put anything in after the = sign?

Thanks
Jon
PS : Sorry no nothing about programming.
Jonj1611
Forum Regular

Usergroup: Customer
Joined: Aug 14, 2005

Total Topics: 33
Total Comments: 107
Posted Apr 03, 2006 - 4:41 AM:

Hi Paul,

Ok, got all that sorted and works fine now smiling face

Thank you very much
Jon
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 04, 2006 - 2:18 AM:

If you can't find charset I'd guess you were searching for it as content rather than name.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.