Problems with special characters
Posted: Thu Sep 20, 2007 11:12 am
I have some strange problems with characters like æ, ø and å, characters we use in Norwegian.
When I use CMSMS "out of the box", there are no problems. But I am using an external database, or rather other tables in the same database as CMSMS and these data are accessed via user defined tags. This tags may be like this:
"$categories = @mysql_query('SELECT * FROM zwpot_categories WHERE cat_ID>2 ORDER BY cat_name');
while ($row = mysql_fetch_array($categories)) {
echo ''. $row['cat_name'] .'
';}"
What this tag should do is to extract headlines from articles stored in the WordPress tables and display them in CMSMS.
The result can be seen in http://www.torvund.net/index.php?page=test&catid=3
In words extracted from the database, these characters are subsituted with �.
If I just make a simple tag like "echo 'a,ø,å,Æ,Ø,Å'; they display correctly, as they do if I use them on a page in CMSMS. And in the database these characters are stored as they are and should be.
They also display correctly when viewed in WordPress.
The line "Klassisk musikk �ker p� nett" from http://www.torvund.net/index.php?page=test&catid=3 is the headline from http://blogg.torvund.net/2007/09/20/kla ... r-pa-nett/ selected from the same field in the database.
Does anyone have any idea where the problem is?
When I use CMSMS "out of the box", there are no problems. But I am using an external database, or rather other tables in the same database as CMSMS and these data are accessed via user defined tags. This tags may be like this:
"$categories = @mysql_query('SELECT * FROM zwpot_categories WHERE cat_ID>2 ORDER BY cat_name');
while ($row = mysql_fetch_array($categories)) {
echo ''. $row['cat_name'] .'
';}"
What this tag should do is to extract headlines from articles stored in the WordPress tables and display them in CMSMS.
The result can be seen in http://www.torvund.net/index.php?page=test&catid=3
In words extracted from the database, these characters are subsituted with �.
If I just make a simple tag like "echo 'a,ø,å,Æ,Ø,Å'; they display correctly, as they do if I use them on a page in CMSMS. And in the database these characters are stored as they are and should be.
They also display correctly when viewed in WordPress.
The line "Klassisk musikk �ker p� nett" from http://www.torvund.net/index.php?page=test&catid=3 is the headline from http://blogg.torvund.net/2007/09/20/kla ... r-pa-nett/ selected from the same field in the database.
Does anyone have any idea where the problem is?