Jump to content

Archived

This topic is now archived and is closed to further replies.

nezbie

Problem with special characters (umlauts) / pulling from mysql

Recommended Posts

Hi, I'm having some trouble pulling data from mysql via a php search script.. Shortly, in mysql, scandinavian special characters are saved by fckeditor (a wysiwyg editor) like this:

ä = ä
ö = ö

Now, when entering a search phrase to a field on my page, ofcourse I would enter something like "öland".. But when the database states this as öland, it doesn't match and no results are found.

So, simply - how to change the special characters in my search string into these "umlauts" "on fly"? - I looked at the manual and came to the conclusion and after testing, that htmlentities or such won't/wouldn't help?

Or am I completely wrong..?

thanx in advance

Share this post


Link to post
Share on other sites
[code]$text = str_replace("ö", "ö", $text);[/code]

Where $text is the text that contains the characters.

Share this post


Link to post
Share on other sites
have a look at this
[a href=\"http://uk.php.net/manual/en/function.get-html-translation-table.php\" target=\"_blank\"]php html translation table[/a]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.