MySQL Forums
Forum List  »  Full-Text Search

Re: Problem with fulltext search using encoded german umlauts (strange behaviour of "MATCH(column) AGAINST ('keyword' IN BOOLEAN MODE)")
Posted by: Rick James
Date: April 23, 2010 10:26AM

Fully clean up things? Here goes...

* Change the 'latin1' settings to 'utf8'
* Change the latin1_swedish_ci settings to utf8_unicode_ci
* Store grave-e as a character, not "è", in the database table.
* If you are using PHP, call the function htmlentities() after fetching from the database, and while building the UI page. (If using some other language, find its equivalent.) This will turn the accent characters in to the & thingies.
* Set the right meta thingie at the top of the html page. This will tell the browser to expect utf8.
* Use mysqli_real_escape_string() (or equivalent) when constructing an INSERT statement destined for mysql.
* Try to have the text in the 'canonical' form in each subsystem (utf8 for MySQL, & thingies for html, Unicode for Java, etc). Hence,...
* Expect to have to "convert" text whenever moving text between subsystems (MySQL, PHP, html, etc) -- not just the ones I mentioned above.

utf8 is the "right" encoding for multi-lingual web pages, especially if multiple languages are presented on the same page.

utf8_unicode_ci is probably better than utf8_general_ci.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.