Problem with unicode

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saucony77
Forum Newbie
Posts: 2
Joined: Fri Jul 24, 2009 4:03 am

Problem with unicode

Post by saucony77 »

Hi,
I have a little search engine with 2 files:
- index.html
- process.php

On index.html, there are 2 fields: on the first, the user write an url; on the second, the user write some keywords to find on the site of the first field.

On process.php, I parse the url for find the keywords. Index.html and process.php are in utf-8 format.

If the site is utf-8.. everything works.
But if the site has an other encoding (ISO 8859-1/occidental), the keyword, often.. not found :cry:

How I can resolve it?
thanks!
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Problem with unicode

Post by Mark Baker »

Read the other sites charset, convert your keywords from UTF-8 to that charset, then do the search
Post Reply