lingua problems with an å

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
tompa5
Posts: 4
Joined: Sun Jun 11, 2006 9:57 pm

lingua problems with an å

Post 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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post 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
tompa5
Posts: 4
Joined: Sun Jun 11, 2006 9:57 pm

Post by tompa5 »

Marvelous =)
I didnt´t think och the charset at all, stupid me!

Thanks alot for your helt.

Best wishes

//Tommy
tompa5
Posts: 4
Joined: Sun Jun 11, 2006 9:57 pm

Post 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
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post 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
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post 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
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
tompa5
Posts: 4
Joined: Sun Jun 11, 2006 9:57 pm

Post by tompa5 »

ok, it works =) Thank you for all your help.
Post Reply