Forum Freeglobes

Aide et support, annonces, thèmes et plugins, discussions.

Vous n'êtes pas identifié.

Annonce

Plugin Allopass amélioré: possibilité de générer des codes gratuits pour votre annuaire! Allez voir sur le site :-)

#1 12-10-2009 02:12:10

spanish
N00b
Date d'inscription: 12-10-2009
Messages: 6

Problem with search and non ASCII characters

Hello,

Apache 2
PHP 5.2.1
MySQL 5.0.44
FreeGlobes 03.01.2009-RC2 (Spanish translated)
Database type and collating: MyISAM utf8_general_ci
config.php: $CONFIG['encoding']    = "ISO-8859-1";
Charset metatag of template: <meta http-equiv="Content-Type" content="text/html; charset=<{$CONFIG.encoding}>" />

I have problems with search and spanish non ASCII characters (ñ, á, é, í, ó, ú,...).

1.- If I submit a link that contains "diseño" in the description, the link is added to database and "diseño" is added like "dise&ntilde;o" in database but appears like "diseño" in the web site.

2.- If I search "diseño" in the web site, I don't have results. If I search "dise&ntilde;o", I have the result.

If I change ISO-8859-I to UTF-8 in config.php encoding, I have the same problem.

I need change the collating of database? Other solution?

Thanks,

Manuel

Hors ligne

 

#2 12-10-2009 07:47:36

Uniktrue
FGnaute
Lieu: Ici et là...
Date d'inscription: 13-09-2009
Messages: 305
Site web

Re: Problem with search and non ASCII characters

Hello,
Have you this in your include/recherche.php :

Code:

if (!empty($seek))
{
    if(isUTF8($seek)) {
        $seek = utf8_decode($seek);
    }
    $seek = strip_tags($seek);
    
    $km =& get_manager("keyword");
    $lm =& get_manager("link");
    $myts =& MyTextSanitizer::getInstance();
    $re = MyRewriteEngine::getInstance();

?

Hors ligne

 

#3 19-10-2009 08:22:33

spanish
N00b
Date d'inscription: 12-10-2009
Messages: 6

Re: Problem with search and non ASCII characters

Hello Uniktrue,

Yes, I have this code in recherche.php (lines 12-22).

Do I need to change anything?

Thanks and greetings,

Manuel

Hors ligne

 

#4 19-10-2009 11:59:45

Uniktrue
FGnaute
Lieu: Ici et là...
Date d'inscription: 13-09-2009
Messages: 305
Site web

Re: Problem with search and non ASCII characters

delete this lines :

    if(isUTF8($seek)) {
        $seek = utf8_decode($seek);
    }

and test wink

Hors ligne

 

#5 20-10-2009 04:22:39

spanish
N00b
Date d'inscription: 12-10-2009
Messages: 6

Re: Problem with search and non ASCII characters

Thanks, Uniktrue,

I have deleted that line, but the problem continues.

sad

Cordial greetings,

Manuel

Hors ligne

 

#6 21-10-2009 06:25:35

spanish
N00b
Date d'inscription: 12-10-2009
Messages: 6

Re: Problem with search and non ASCII characters

Hello again,

I have located where is the problem: only in admin area.

If I submit a new site from the public area (Basic or Premium), no problem. All is correct (including searches with non ASCII characters).

But when I edit a site or submit a new site from the admin area, characters are stored incorrectly and the searches do not work OK.

Any idea?

Thanks,

Manuel

PS: yes, I'm analyzing those files...

Hors ligne

 

#7 22-10-2009 01:15:31

spanish
N00b
Date d'inscription: 12-10-2009
Messages: 6

Re: Problem with search and non ASCII characters

Hello,

We have installed FG into a latin1_general_ci MySQL database, and we have the same problem.

We continued doing tests and we have determined a little more where is the problem:

Table: link
Field: description
Directory: admin

That is, we only have problems with the field "description" when we submit or edit a link from admin area. In these cases, characters non ASCII of the field "description" are converted (ñ => &ntilde;) (á => &aacute;) (etc.) and search does not find original non ASCII characters.

Example: link with name=España and description=Españoles.

1.- If we submit our link sample from public area (basic or premium), no problem. All is OK, both on the web and into database.

2.- But if we submit or edit our link sample from admin area:

2.1.- Field "name" is OK (=España, both on the web and into database) and search find it.

2.2.- Field "description" is converted (on the web = Españoles, into database = Espa&ntilde;oles), and search don't find it.

In this case (2),

a) If we search "España", we find results (because "España" is into the field "name" -no converted-).

b) If we search "Españoles", we don't find results (because "Españoles" is into the field "description" -converted-).

c) If we search "Espa&ntilde;oles", we find results (because "Españoles" was converted to "Espa&ntilde;oles" into database). But no one search &ntilde;...

Any idea?

Thanks and cordial greetings,

Manuel

Hors ligne

 

#8 22-10-2009 11:50:46

spanish
N00b
Date d'inscription: 12-10-2009
Messages: 6

Re: Problem with search and non ASCII characters

Hello again,

The problem is FCKeditor. This WYSIWYG converts the non ASCII characters.

Interim patch:
Line 107 of /themes/admin/admin_link_siteform.html
Delete:
<{$FCKeditor}>
Add:
<textarea name="description" cols="50" rows="20"><{$description}></textarea>

Now, we don't have a WYSIWYG into admin area, but we can submit and edit links without character conversion. And we can search and find words with non ASCII characters.

\ ;-)

--------------------------------------

Any ideas about FCKeditor definitive solution?

Thanks and cordial greetings,

Manuel

Hors ligne

 

Pied de page des forums

Propulsé par PunBB
© Copyright 2002–2005 Rickard Andersson
Traduction par punbb.fr


BlogCounter
FosseeneProduct - annuaire mon pagerank - films x achats en lignes sexe gratuit blog buzz