[TYPO3-dev] MySQL, search and utf8

ries van Twisk typo3 at rvt.dds.nl
Mon Oct 8 20:29:36 CEST 2007


On Oct 8, 2007, at 1:05 PM, Martin Kutschker wrote:

> Steffen Kamper schrieb:
>> Hi,
>>
>> i have a non-TYPO3-question.
>>
>> I perform a search in MySQL and for example look for the word  
>> "schön". So my
>> query looks like:
>>
>> Select .... where ... and (body like "schön%" or body like "%schön 
>> %" or body
>> like "%schön" or body = "schön")
>>
>> looking to the results i see that MySQL shows up result with the word
>> "schon" which is different. Thoug it is utf8, the letter ö is  
>> saved in utf8
>> as 2-Byte, so why gives MySQL me the result with o?
>
> Mysql knows three character sets: the one the clients sends (queries),
> the one the server uses (data storage) and the one the the server  
> sends
> (query results).
>
> Seems like the last settings is for some reason not UTF8. See the  
> Mysql
> docs on how to set (and check) those settings.

It has something todo what collation is used internally for sorting  
and filtering...
In this case MySQL did a good thing and did stick to standards... see  
below..

>
> Masi


Hey steffen,

this document will explain it to you..
http://dev.mysql.com/doc/refman/5.0/en/charset-collation-effect.html

and this one how to solve your specific problem..

http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html

Ries












More information about the TYPO3-dev mailing list