[EMAIL PROTECTED] writes:
 > I have a table in a mysql database that contains data from two 
 > different languages using two different character sets.  I need to be 
 > able to query in either language. Queries that I run against the data 
 > in English seem to run fine.  However, queries against the data in 
 > the other language give inconsistent results.  If the search string 
 > has multiple words then the results will contain rows that do not 
 > contain the entire search string.  I am running the query through 
 > PHP.  The query is
 > select sourceid, $SearchLanguage from sources where  
 > $SearchLanguage like \"%$SearchString%\"
 > 
 > The query runs to completion correctly but returns seemingly 
 > invalid results.
 > 
 > I am running mysql 3.23.32 on a RedHat Linux 7.0 system.  Mysql 
 > gets started up on startup via safe_mysqld.  I have tried adding 
 > default-character-set in my.cnf to set the character set to the other 
 > language's character set.  I have placed this both in the 
 > safe_mysqld section and in the mysql.server section and reindexed 
 > the table (using myisamchk -r -q) but that hasn't changed the 
 > behavior.
 > 
 > I thought that I might have to recompile mysql to support the other 
 > character set but from the documentation (section 4.6.1) it seems 
 > that all standard binary distributions come with support for 
 > additional character sets built in.
 > 
 > Any help in sorting out this problem would be appreciated.

Hi David,

What does 'mysqladmin variables | grep character_set' give you?  You
should see the current character set in use and the available
character sets. Please make sure that you've started your mysqld with
the correct character set.

Please note that you can only use one character set at a time for one
instance of mysqld. You need to restart, or start another instance of
mysqld if you want to use two character sets. (make sure you know
the dangers of starting two mysqlds in the same datadir at the same
time, pls. see '4.7.3 mysqld_multi, program for managing multiple
MySQL servers' from the MySQL manual, in case you want to try it)

When a character set is changed, any tables involved should be
reindexed with myisamchk -q -r, like you said you've done.

Regards,

- Jani

For technical support contracts, visit https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Jani Tolonen <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
/_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
       <___/   www.mysql.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to