Archived CMSimple Support Forum

The Old CMSimple User Community
It is currently Thu Sep 02, 2010 4:37 pm

This archived CMSimple Support Forum will be locked primo June 2008. Users with a commercial licence are advised to register and use the new Official Support Forum at CMSimple.com instead. A community driven forum with free registration is found at cmsimpleforum.com.

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: search problem Ü
PostPosted: Sun Feb 11, 2007 7:16 pm 
Offline

Joined: Sun Feb 11, 2007 6:45 pm
Posts: 6
I'm from Estonia and I have one search problem. In Estonian we have letters ü, ä, õ, ö and we use them a lot.
When these letters are in small caps (öäüõ), everything works just fine. But if letter or letters are in CAPS (ÜÖÄÕ), search can not find a thing if you enter search word in small caps.

I put clean and new version 2.7 fix 1 in http://www.eestirukkiselts.ee/aju/
In front page there is a word "RÜÜTEL". If you enter search word in small caps (rüütel), nothing can be found.

I tried to add html_entity_decode in search.php, but its not helping.
Code:
if(@preg_match('/'.preg_quote($search,'/').'/i',$c[$hc[$i]]))
Code:
if(@preg_match('/'.preg_quote($search,'/').'/i',html_entity_decode($c[$hc[$i]])))

Could somebody please help me.

Best regards,
Priit


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 9:26 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
The i delimiter scould make the preg_match case insensitive ... can't find anything about it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 15, 2007 4:01 pm 
Offline

Joined: Sun Feb 11, 2007 6:45 pm
Posts: 6
Hi, I tired to search "änderungen"
in page
http://www.cmsimple.de/cmsimple/
and nothing can be found.

If you search "Änderungen" 2 matches are found.

So, there's nothing can be done?

Best regards,
Priit


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 15, 2007 4:49 pm 
Offline

Joined: Fri Aug 05, 2005 10:18 am
Posts: 103
Location: Old Europe
Hi Peter,

fant4fx is right. I've realized the same promblem.

If there is "gründlich" somewhere on the website, searching for "gründlich" works - searching for "grÜndlich" does not.

The i delimiter does not works on Ü ü etc...

But there is another problem. It seems that the search-function only finds stings that contains special-chars if they are on <h2>-level or lower...

Strings on <h1>-pages with special-chars will not be found.

Greets


Top
 Profile  
 
 Post subject: Accents in template names:
PostPosted: Sat Feb 17, 2007 2:58 pm 
Offline

Joined: Sat Jan 10, 2004 1:57 am
Posts: 438
Location: Rochester, England.
Watch out for this one too.

I wrote a template and called glück. It worked perfectly. The client was happy. She then phoned to say that pictures weren't displaying on IE. True, but Firefox was perfect. I looked at the code offline on EasyPHP. Firefox, IE worked but Opera didn't. I uploaded the files again. Firefox, yes, IE no, Opera no.

I made another quick and dirty template to get my client back on line and called it keingluck (sic) and the damn thing worked. I got rid of the spelling mistake keinglück- and Firefox, yes, IE no, Opera no.

The fault disables the images in the template, including the ones in the menu folder, and dhtml navigation. It only occurs on some php servers.

I am just posting this for completeness-- the whole thing is now working, its a shame that the 1998 Rechtschreibungreformen didn't forsee this!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 11:21 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
To Clem - Never never use special characters for file or folder names.

The only solution I see to the search problem is to convert both search string and page content to uppercase using http://www.php.net/manual/en/function.mb-strtoupper.php


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 3:02 pm 
Offline

Joined: Sun Feb 18, 2007 12:13 pm
Posts: 262
Location: Hamburg, Germany
I noticed some things:

sometimes functions like stringtoupper are used
not all PHP-string-functions do work with Unicode

if you have set your page to Unicode, you will run into some problems (I just had yesterday)

unfortunately PHP, as far as I know in PHP 4.x, concentrates on western standard codes, iso-8859-1 for example, on singlebyte-codes and not on multibyte-codes

the problem could lie there


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 01, 2007 12:18 pm 
Offline

Joined: Fri Aug 05, 2005 10:18 am
Posts: 103
Location: Old Europe
@harteg:

Did you read my posting. There is another "searching"-problem and has nothing to do with upper/lower-case.

Words with special-chars on <h1>-pages will not be found by the seach-function. Same words on <h2-h4>-pages appear correctly at the search-results.

Greets


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 01, 2007 12:56 pm 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
Quote:
Words with special-chars on <h1>-pages will not be found by the seach-function. Same words on <h2-h4>-pages appear correctly at the search-results.



This is not solved with html_entity_decode ? I really don't understand how heading level influence on this.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 02, 2007 10:37 am 
Offline

Joined: Fri Aug 05, 2005 10:18 am
Posts: 103
Location: Old Europe
@harteg:

Hey, actually...

Code:

if(@preg_match('/'.preg_quote($search,'/').'/i',html_entity_decode($c[$hc[$i]])))


...solved the problem.

Greets


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 6:40 am 
Offline

Joined: Sun Feb 11, 2007 6:45 pm
Posts: 6
Hi,

the main problem is still with no answer.

Does anybody managed to make this change and did it help?

-------------------------
The only solution I see to the search problem is to convert both search string and page content to uppercase using http://www.php.net/manual/en/function.mb-strtoupper.php
--------------------------


Cheers,
Priit


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 19, 2007 7:59 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
This has been implemented in 2.8 beta 1-2:

Code:
if(@preg_match('/'.preg_quote($search,'/').'/i',html_entity_decode($c[$hc[$i]])))


Please try out this code:

Code:
if(@preg_match('/'.preg_quote(mb_strtoupper($search),'/').'/i',mb_strtoupper(html_entity_decode($c[$hc[$i]]))))


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 4:02 pm 
Offline

Joined: Sun Feb 11, 2007 6:45 pm
Posts: 6
Hi,

this code gives me white page :(

Priit


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 8:18 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
A ) was missing:

if(@preg_match('/'.preg_quote(mb_strtoupper($search)),'/').'/i',mb_strtoupper(html_entity_decode($c[$hc[$i]]))))


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 27, 2007 7:04 am 
Offline

Joined: Sun Feb 11, 2007 6:45 pm
Posts: 6
still white page :(


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group