[Resolved] Search for a word accentuated

Found a bug? Tell us!!
Post Reply
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

[Resolved] Search for a word accentuated

Post 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.
Last edited by Barberousse on Tue Jan 08, 2008 9:54 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Search for a word accentuated

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Post by Barberousse »

Should I change table's collations on all serendipity tables ?

Barberousse.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Barberousse
Regular
Posts: 26
Joined: Sun Dec 30, 2007 8:07 pm

Post 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
Post Reply