close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Search problems when using utf-8

Thread began 5/18/2010 7:25 pm by Miguel | Last modified 5/21/2010 1:33 am by Jimmy Wu | 1140 views | 3 replies |

Miguel

Search problems when using utf-8

Hello i have been working mostly with charset=iso-8859-1 today i encountered a server that has problems with that charset so i had to work with UTF-8, the search works fine with any characters that are not latin or spanish but if a word starts with Ñ or ñ i have to type the exact way its been inserted in the database why would this happen for example if i do APPLE or apple or Apple it will find any records with the word apple any way its writen, but if a word has an acent or for example Énfasis (spanish word) the search only works if i write it the exact way if i type in the search énfasis it will not be found, this never happened with iso-8859-1, but does with utf-8 and have not found a way to work this around any suggestions?

And i cant change the server its a cliente server wich has the Mod_security filter turned on, so if the get from the search shows any latin character it will not load the pages.

Thanks for any help

Sign in to reply to this post

Jimmy Wu

This might be caused by having the charset being different on your page and in the database. Check to make sure that the database has utf-8 specified as well as the page having utf-8 specified as the charset and try it again. One other thing you can do is try querying directly in the database to see if you get the results when you search using the capital and lowercase with the symbols.

Sign in to reply to this post

Miguel

Thanks for the replay i discover that this happens on servers that have mod_security installed and set on, there is a work around on the net when this happens adding an htaccess file with

#Desactivando  mod_security.SecFilterEngine  Off
SecFilterScanPOST Off


But that did not work for me, the problem was the server when it had the iso-8859-1 it displays the link (searching keyword Ñame):

Resultado.php?Search_pro=%D1ame&Search.x=0&Search.y=0&Search=Search

Now in UTF-8 the link of the search for Ñame displays
Resultado.php?Search_pro=Ñame&Search.x=0&Search.y=0&Search=Search

Now if you can see the difrence how it looks Search_pro=%D1ame with Search_pro=Ñame

With the iso-8859-1 i was getting on the server an error page (HTTP 406 Error: An appropriate representation of the requested resource… )

So what i did was change everything to UTF-8, opened up phpmyadmin clicked on operation changed the collition of the database and then of every table and cell, this works so so cause now when its utf it doesnt distinguish spanish or latin characters that are capitalized or not Ñ or ñ wich doesnt happen with the normal english characters K=k but with special characters they seem to be diferent Ñ!=ñ, i checked the database to see what codes are placed for special characters so in it ñ=ñ and Ñ=Ñ so for now i added a msg on the search if your search didnt work test capitalizing first character or bla bla bla, guess its more a mysql and the server settings but on others server the iso-8859-1 works just fine with no problem.

Sorry my poor english

Sign in to reply to this post

Jimmy Wu

If the values are represented differently like that, the search wont be able to be modified to work to search for both lower and upper case letters. The best you can do is letting users know about the capitalization issue unless you can get the character set working on the server.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...