Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Encyclopedia Module with terms in non-english language



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
koun
Second Lieutenant
Second Lieutenant


Joined: 19 Aug 2003
Posts: 110
Location: Greece

PostPosted: Sun Oct 12, 2003 8:34 am    Post subject: Encyclopedia Module with terms in non-english language
Reply with quote

I am trying to make a list in the encyclopedia module using the greek language, and it cant recogize it ! If i try to add a term in english it works fine but when i try in greek it dont show up!
Back to top
View user's profile Send private message Visit poster's website
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Sun Oct 12, 2003 11:38 am    Post subject:
Reply with quote

First, make sure that the MySQL server uses the right character encoding. From the MySQL manual on The Character Set Used for Data and Sorting:
Quote:
Open quoteBy default, MySQL uses the ISO-8859-1 (Latin1) character set with sorting according to Swedish/Finnish. This is the character set suitable in the USA and western Europe.

All standard MySQL binaries are compiled with --with-extra-charsets=complex. This will add code to all standard programs to be able to handle latin1 and all multi-byte character sets within the binary. Other character sets will be loaded from a character-set definition file when needed.

The character set determines what characters are allowed in names and how things are sorted by the ORDER BY and GROUP BY clauses of the SELECT statement.

You can change the character set with the --default-character-set option when you start the server. The character sets available depend on the --with-charset=charset and --with-extra-charsets= list-of-charset | complex | all | none options to configure, and the character set configuration files listed in `SHAREDIR/charsets/Index'. Close quote


From what I can read in the comments for the German character set, if you change the default character encoding of mysqldd after you have already entered some texts with a different character set previously, you will have to export the database and reimport it, for all texts to be stored with the right character encoding. "REPAIR" or "MYISAMCHECK" will not help, even if the documentation wants to make us believe they will. You can see the character set used in a table by issuing the command

Code:

myisamchk -dvv table.MYI


If it is not the one you want, then the only thing that helps is to export the DB and reimport it with:

Code:

Export:

mysqldump --all-databases --add-drop-table > backup.sql

Import:

mysql -lL < backup.sql


Your character encoding should be set to greek, see the Table with Character Sets and Corresponding 4.1 Character Set/Collation Pairs.

Now what if you want to mix chinese and greek together? Then your best bet would be to go with Unicode.

There's more to this topic, stay tuned...Smile
_________________
Regards

Chris Karakas
www.karakas-online.de


Last edited by chris on Wed Dec 31, 2003 12:08 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Sun Oct 12, 2003 12:06 pm    Post subject:
Reply with quote

Even if you set the character encoding correctly in MySQL, you may still want to change the $alphabet array in the alpha() function of modules/Encyclopedia/index.php:

Code:

    $alphabet = array ("A","B","C","D","E","F","G","H","I","J","K","L","M",
                       "N","O","P","Q","R","S","T","U","V","W","X","Y","Z");


Add your greek letters there, either by intermixing them with the english ones, or by deleting the english ones alltogether.

The way all this works is by constructing a database query that finds all entries of the given encyclopedia id having a title which, when transformed to all uppercase, starts "like" the given letter, where the letter can only be one of the entries in the $alphabet array. See for yourself in function terms() of modules/Encyclopedia/index.php:

Code:

$sql = "SELECT tid, title FROM ".$prefix."_encyclopedia_text WHERE UPPER(title) LIKE '$ltr%' AND eid='$eid'";

_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
koun
Second Lieutenant
Second Lieutenant


Joined: 19 Aug 2003
Posts: 110
Location: Greece

PostPosted: Mon Oct 13, 2003 6:46 am    Post subject: thanks
Reply with quote

Thanks Chris it is working now !
Back to top
View user's profile Send private message Visit poster's website
saxinidis
Lance Corporal
Lance Corporal


Joined: 09 Jan 2005
Posts: 9
Location: grece

PostPosted: Thu Jan 13, 2005 3:37 pm    Post subject:
Reply with quote

This solution is for the encyclopedia module is not for the module weblinks.
I need to fix the sorting problem with greek characters in weblinks module.
Thanks
Back to top
View user's profile Send private message Send e-mail
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Thu Jan 13, 2005 11:21 pm    Post subject:
Reply with quote

Well, not exactly. In this thread there are other tips too - tips that apply generally, irrespectively of the module used.

Arrow Did you make sure your MySQL server uses the right character encoding, for example? If you changed the character encoding now, did you export and reimport the database as suggested?
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
saxinidis
Lance Corporal
Lance Corporal


Joined: 09 Jan 2005
Posts: 9
Location: grece

PostPosted: Fri Jan 14, 2005 1:51 pm    Post subject:
Reply with quote

No, i didnot export and reimport the database !!
Sorry!!
But the database is more than 10Mb i need to do in all database or in some tables only?
And the problem i have it and local too.
Only if i change the character set to mysql (my.ini - greek) it works local propably.
Back to top
View user's profile Send private message Send e-mail
artd
Private
Private


Joined: 08 Jan 2008
Posts: 1

PostPosted: Tue Jan 08, 2008 1:28 pm    Post subject:
Reply with quote

when i try to import i got

Code:
CREATE TABLE `nuke_encyclopedia` (
`eid` int( 10 ) NOT NULL AUTO_INCREMENT ,
`title` varchar( 255 ) CHARACTER SET latin5 NOT NULL default '',
`description` text CHARACTER SET latin5 NOT NULL ,
`elanguage` varchar( 30 ) CHARACTER SET latin5 NOT NULL default '',
`active` int( 1 ) NOT NULL default '0',
PRIMARY KEY ( `eid` ) ,
KEY `eid` ( `eid` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =8;


MySQL:
Code:
#1050 - Table 'nuke_encyclopedia' already exists


it says file is already exsist..

What i have to do ? i use Nuke 7.9

Best wishes


[edit] Included code in code tags. Floren [/edit]
Back to top
View user's profile Send private message
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 1
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group