WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums


UTF issue

Version: 4.1.6 P
printPrint


UTF issue
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 45
Total Posts: 83
Posted 11/01/07 - 03:54 PM:
quote post
#1
I want to use the forum with a non-english language but i don't want to use the multilingual templates, they are very difficult to edit.

First of all i changed both wrappers to use 'UTF-8'. My database is set to utf8_unicode_ci.
Although my language characters shows ok in the forum, phpmyadmin shows garbage.
I searched a little and found a way to fix this by adding in mysql.php:

function db($dbhost, $dbuser, $dbpass, $databasename)
{
$this->dbh = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$this->dbh) return false;
////////// my code;
mysql_query("SET NAMES 'utf8'", $this->dbh);
////////////////////////////////////////////////////
mysql_select_db($databasename);

Not sure if this a bug or because i don't use the multilingual templates, so i am posting it just in case.

Please tell me if there is something wrong with this fix, before i start to use the forum for real. As far as i tested it, it works fine.

thanks
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 11/02/07 - 03:04 PM:
quote post
#2
I'll need an example of the characters you're typing so that I can test it.

I want to use the forum with a non-english language but i don't want to use the multilingual templates, they are very difficult to edit.

Probably the quickest way is to do a multilingual install, then run the template translation after you've translated the language pack, then trim the language pack with the language page's "Clean out all unused items" option.
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 45
Total Posts: 83
Posted 11/02/07 - 05:22 PM:
quote post
#3
I'll need an example of the characters you're typing so that I can test it.

sample: "αγςρτγσε ργ ρεσγσε γρεσγ"



Probably the quickest way is to do a multilingual install, then run the template translation after you've translated the language pack, then trim the language pack with the language page's "Clean out all unused items" option.

If i understand correctly, you mean how to translate the forum's language-pack from english to my language without using the multilingual templates.
I don't want to do that, i will use the english language-pack. All i want is the forums/topics/posts text to be in my language using unicode.
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 45
Total Posts: 83
Posted 11/03/07 - 04:59 PM:
quote post
#4
I just found out that it only works if i use the plain editor. The fckeditor stores the post's message in database like
"εεεσ& gamma; η"

I found a similar thread about this problem with fckeditor here, they didn't manage to fix it though.
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 55
Total Posts: 5703
Posted 11/04/07 - 01:09 PM:
quote post
#5
Reply #9 seems to be a solution. Does setting FCKConfig.IncludeGreekEntities = false; not help you? It caches aggressively so you might need to check it in a different browser to be sure you're not getting a cache.

i will use the english language-pack.

My point was that doing so makes it take longer and makes it easier to miss something, and potentially complicates future upgrades.

Edited by Paul on 11/04/07 - 01:11 PM
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 45
Total Posts: 83
Posted 11/05/07 - 03:28 AM:
quote post
#6
Reply #9 seems to be a solution. Does setting FCKConfig.IncludeGreekEntities = false; not help you? It caches aggressively so you might need to check it in a different browser to be sure you're not getting a cache.

Yep it was the cache the problem. Works great now, thanks.



My point was that doing so makes it take longer and makes it easier to miss something, and potentially complicates future upgrades.

Just to be sure that we are talking about the same thing, what i want to do is to have all the menus and fixed-text of the forum in English. I want to show with Greek characters only the topics and posts, nothing else.
Is it better to make a multilingual install in my case ?

The only thing i had to change so far, is the
<IF {ISMULTILINGUAL}><meta http-equiv="Content-Type" content="text/html; charset={LANG_CHARSET};"></IF>
in the admin wrapper.


Edited by sertan6 on 11/05/07 - 03:31 AM
sertan6
Experienced

Usergroup: Customer
Joined: Feb 22, 2004
Total Topics: 45
Total Posts: 83
Posted 11/05/07 - 01:50 PM:
quote post
#7
I spoke too soon, there are still problems with some characters such as this one "Β".
Although it is stored correctly in the database, if i edit the message the character shows garbage.
Other characters create a space in each line of the message...

This fckthing is not meant to work with greek characters, i think i'll stick with the plain editor.

thanks
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.