Page 1 of 1

[Resolved] Search for a word accentuated

Posted: Fri Jan 04, 2008 2:58 pm
by Barberousse
Hello,

With Serendipity 1.2.1, PHP 5.1.3 and the quick search plugin, a search with the word "fatiguée" for instance will give no result, but it will give correct results with "fatigu*e".

A problem of encoding maybe?

Thank you.

Barbrousse.

Re: Search for a word accentuated

Posted: Mon Jan 07, 2008 4:55 pm
by garvinhicking
Hi!

Which databsae and version are you using? And which charset/lanauge have you configured for your Serendipity blog?

Regards,
Garvin

Posted: Mon Jan 07, 2008 6:10 pm
by Barberousse
Hello,

The "entries" table is using the "latin1_general_ci" table type. MySQL is version 5.0.45 UTF-8 Unicode (utf8). Serendipity is configured with "Enable DB-charset conversion" to "No", "Language" to "French" and charset to "UTF-8".

Thank you for you help.

Barberousse.

Posted: Mon Jan 07, 2008 6:13 pm
by garvinhicking
Hi!

When you set DB-charset conversion to "Yes" and change the table's collations to "utf8" it should work, can you try this?

Regards,
Garvin

Posted: Mon Jan 07, 2008 10:55 pm
by Barberousse
Should I change table's collations on all serendipity tables ?

Barberousse.

Posted: Tue Jan 08, 2008 10:35 am
by garvinhicking
Hi!
Barberousse wrote:Should I change table's collations on all serendipity tables ?
Yes, that would be best. Make a backup first, though.

Regards,
Garvin

Posted: Tue Jan 08, 2008 11:59 am
by Barberousse
Ok, I made a complete dump of my database, change every charset from latin1 to utf8 and every collate from latin1_general_ci to utf8_unicode_ci.

It didn't work for the tables serendipity_permalinks and serendipity_plugincategories (key too long (1000 max)) so I let this tables with latin1 charset. Is it a problem?

No, the search for word with accent is working. The Enable DB-charset conversion is still positionned to "no" (if I put it to "yes", "é" is replaced by "é" for instance).

Thank you !

Barberousse.

Posted: Tue Jan 08, 2008 2:54 pm
by garvinhicking
Hi!

Ah, okay - you shouldn't really have needed to perform a complete redump; you can change collations with existing data. :)
It didn't work for the tables serendipity_permalinks and serendipity_plugincategories (key too long (1000 max)) so I let this tables with latin1 charset. Is it a problem?
Latin1 for those tables is okay, they contain no values other than ASCI.

Best regards,
Garvin

Posted: Tue Jan 08, 2008 9:54 pm
by Barberousse
Of course, but it was the fastest way: to do a dump, replace latin1 with utf8 and latin_idontrememberwhat_ci with utf8_unicode_ci with a text editor and execute the query.

But I lost all "à" because the "à" gives "Ã " (0xC3A0 in hex) and the space (0xA0) becomes another space (0x20) when you copy and paste the dump text file... I corrected manually because I have very few posts on my blog.

Thank you anyway.

Barberousse