Recent Topics

1 Oct 16, 2007 23:10    

My b2evolution Version: 1.10.x

I did a conversion of everything in my blog to utf-8. I modified the database tables so that text fields have utf8 encoding and utf8_spanish_ci collation. I followed the advise and a script of someone in another thread, which right now I don'r remember. Everything fine... except for one thing:

Now when I insert accented characters in the title of a post, the urltitle is all messed up. For example, if the title is "Cita Liberal del día", the urltitle is "cita_liberal_del_dasa", when it sould be "cita_liberal_del_dia". Or when the title contains the word "arrastrándose", the urltitle contains "arrastraindose", when it should be "arrastrandose".

Before the change to utf-8 the transformation of accented characters into ascii was working as expected. So I guess the function that handles the conversion is not prepared to work with utf-8.

Any ideas?

2 Oct 18, 2007 18:00

I got the same problem when I migrated the mine to utf8. I have done a hack somewhere, I will try to find and post it here.

3 Oct 18, 2007 18:08

I find it!

It's in inc/MODEL/items/_item.funcs.php

You need to modify the function urltitle_validate

CHange the line


$urltitle = htmlentities( $urltitle, ENT_NOQUOTES );

to


 $urltitle = htmlentities( $urltitle, ENT_NOQUOTES,'UTF-8' );

4 Oct 31, 2007 15:10

Obrigado Walter!

It works.


Form is loading...