Page 1 of 1

lingua problems with an å

Posted: Sun Jun 11, 2006 10:09 pm
by tompa5
Script URL: www.tompa5.com/tompa/footprints.php
Version of script: 1.41
Version of PHP:
Hosting company:
Have you searched THIS FORUM for your problem: yes
(if not please do before posting)
If so, what terms did you try:

Write your message below:
Ok, i love your gbook but ihave a problem with the letter å that isn´t supported by the gb..any ideas?
When i type an å it gets replaced by å

can someone please help mee with this??


//Tommy

Posted: Mon Jun 12, 2006 2:07 am
by Henrie
Hello tompa5

I think this is related to the charset that is used by the page.
In your normal pages you use iso-8859-1.
GBook uses windows-1250

Try the following:

Find this line in the gbook.php files (line 840 in version 1.41)

Code: Select all

<meta content="text/html; charset=windows-1250">
and change it to this

Code: Select all

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

Posted: Mon Jun 12, 2006 5:57 pm
by tompa5
Marvelous =)
I didnt´t think och the charset at all, stupid me!

Thanks alot for your helt.

Best wishes

//Tommy

Posted: Tue Nov 07, 2006 8:43 pm
by tompa5
ok, now for the continuum of this problem...
I´ve updated teh guestbook to 1.43 and the linguaprob appears again...

Code: Select all

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
but the letter å doesnt appear, it gets replaced by a ĺ.... what to do?

In IE it looks fine but in FF it looks like that...

thanx in advance

//T

Posted: Tue Nov 07, 2006 9:25 pm
by Henrie
Hello tompa5,

I have looked at the page at this link http://www.tompa5.com/tompa/gb/gbook.php and indeed the å is displayed as ĺ in Firefox (and not in Internet Explorer).

I looked at the source code and saw that the charset is

Code: Select all

<meta content="text/html; charset=windows-1250">
and not

Code: Select all

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
Perhaps this could be the problem?

Greetings,
Henrie

Posted: Wed Nov 08, 2006 1:22 pm
by Klemen
Hi,

Can you try this and let me know if it helps?

Open gbook.php and change line 918 from

Code: Select all

$in = htmlspecialchars($in);
to

Code: Select all

$in = htmlspecialchars($in);
$in = preg_replace('/&(\#[0-9]+;)/','&$1',$in);
Won't have any effect on the old posts, but see if new ones work with that letter.

Regards

Posted: Sat Dec 09, 2006 2:57 pm
by tompa5
ok, it works =) Thank you for all your help.