Script URL: http://encontrosdaeira.com/mboard/mboard.php
Version of script: 1.22
Version of PHP:
Hosting company:
Have you searched THIS FORUM for your problem: yes
If so, what terms did you try: read all the forum!!!
Write your message below: Hi I'm portuguese and I'm trying to implement your message board in my site, but I'm stuck with a problem. In portuguese we use special characters such as Ç and we also use theese acents on our letters: â and ã. But when someone writes theese letters in the site the only thing that appears are numbers and symbols. How can I prevent this?
Thanks,
Pedro
problem with special letters
Hello Pedro,
I first thought it was the following problem (but after testing it, it did not help).
EDIT Aug 01, 2006: The following solution does work, I guess I made an error in my tests.
In your regular pages you use the utf-8 charset. In the MBoard pages the windows-1250 charset is used.
To correct this you must edit the mboard.php file to set the correct charset settings.
In line 310 and line 681 is the current code
This code is not defined as it should be. The correct code is
To resolve your problems, change it to utf-8
When the windows-1250 charset is used, the ã character is converted to it's numerical value ã (where the & character in the page code is written as &) When you use the utf-8 charset it is not converted.
EDIT Aug 01, 2006: The chars are only converted to their numerical value when they are not inluded in the windows-1250 charset (for example á â ă ä are included and à å are not)
EDIT Aug 01, 2006: The following grey text does not apply any more because the solution above DOES work.
Because i use the GBook where this solution helps, i thought it would help to in MBoard, but it does not.
I now think it has something to do with the multiple htmlspecialchars functions used in the mboard.php file which converts special charachters like & to & so they display right. But i'm not really sure. And i'm not familiar enough with this script and the htmlspecialchars function to resolve this problem.
I hope Klemen can help you.
Greetings,
Henrie
I first thought it was the following problem (but after testing it, it did not help).
EDIT Aug 01, 2006: The following solution does work, I guess I made an error in my tests.
In your regular pages you use the utf-8 charset. In the MBoard pages the windows-1250 charset is used.
To correct this you must edit the mboard.php file to set the correct charset settings.
In line 310 and line 681 is the current code
Code: Select all
<meta content="text/html; charset=windows-1250">
Code: Select all
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
Code: Select all
<meta http-equiv="content-type" content="text/html; charset=utf-8">
EDIT Aug 01, 2006: The chars are only converted to their numerical value when they are not inluded in the windows-1250 charset (for example á â ă ä are included and à å are not)
EDIT Aug 01, 2006: The following grey text does not apply any more because the solution above DOES work.
Because i use the GBook where this solution helps, i thought it would help to in MBoard, but it does not.
I now think it has something to do with the multiple htmlspecialchars functions used in the mboard.php file which converts special charachters like & to & so they display right. But i'm not really sure. And i'm not familiar enough with this script and the htmlspecialchars function to resolve this problem.
I hope Klemen can help you.
Greetings,
Henrie
Last edited by Henrie on Tue Aug 01, 2006 9:56 pm, edited 1 time in total.
Hi,
Like Henrie said first try changing the charset code to utf-8 or this
Note that the changes will only be visible on NEW posts, not the old ones! If it works in GBook it should also work in MBoard since GBook also uses htmlspecialchars function (inside gbook_input).
So, try changing the charset, refresh your mboard.php page and see if you can post your special letters in new posts.
Like Henrie said first try changing the charset code to utf-8 or this
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
So, try changing the charset, refresh your mboard.php page and see if you can post your special letters in new posts.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
No, it does not work,
I already tried this before posting. That's why i wrote that i first thought the utf-8 charset was the problem.
That solution works in GBook, but not in Mbook. I think in Mbook the message goes through htmlspecialchars function more than once.
However, the charset should still be changed to utf-8, but the problem this thread is about is not solved by that (it is only part of the solution).
Greetings,
Henrie
I already tried this before posting. That's why i wrote that i first thought the utf-8 charset was the problem.
That solution works in GBook, but not in Mbook. I think in Mbook the message goes through htmlspecialchars function more than once.
However, the charset should still be changed to utf-8, but the problem this thread is about is not solved by that (it is only part of the solution).
Greetings,
Henrie
I don't know, seems to work here (with the default charset):
http://www.phpjunkyard.com/mboard/msg/6159.html
http://www.phpjunkyard.com/mboard/msg/6159.html
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
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


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
Hello,
I also made (more extensive) test. See the (second) reply message: http://www.phpjunkyard.com/mboard/msg/6161.html
It seems that some characters are converted ok and some are not. I think this is because of the charset used charset=windows-1250 does not support all the characters i used.
The characters that are displayed as their numerial representation are not included in the windows-1250 charset. The characters displayed as recognisable characters are included in the windows-1250 charset.
I hope this clears things.
I just made a new test at my test server at home in which i converted in mboard.php the charset to utf-8 and now it works (though in an earlier test it did not).
I think in my previous test I only changed the charset in one instance (a bit sloppy of me) but the charset is present in two instances in the mboard.php file (like i mentioned in my own post earlier).
My conclusion therefore is that my solution as posted earlier in this thread (viewtopic.php?p=4043#4043) is indeed the answer to your question.
And as Klemen mentioned, this only is a solution for new posts. It does not help for messages that have already been posted.
Greetings,
Henrie
I also made (more extensive) test. See the (second) reply message: http://www.phpjunkyard.com/mboard/msg/6161.html
It seems that some characters are converted ok and some are not. I think this is because of the charset used charset=windows-1250 does not support all the characters i used.
The characters that are displayed as their numerial representation are not included in the windows-1250 charset. The characters displayed as recognisable characters are included in the windows-1250 charset.
I hope this clears things.
I just made a new test at my test server at home in which i converted in mboard.php the charset to utf-8 and now it works (though in an earlier test it did not).
I think in my previous test I only changed the charset in one instance (a bit sloppy of me) but the charset is present in two instances in the mboard.php file (like i mentioned in my own post earlier).
My conclusion therefore is that my solution as posted earlier in this thread (viewtopic.php?p=4043#4043) is indeed the answer to your question.
And as Klemen mentioned, this only is a solution for new posts. It does not help for messages that have already been posted.
Greetings,
Henrie