Jump to content

Problem with chars


Rommeo

Recommended Posts

my db's charset and connection type is utf8_unicode_ci

php files are utf8

 

I have two names

blue

facileæ

 

When I search for ;

blue - script can find it

facil - script can find the facileæ and prints

facileæ - can not find

 

when there is a character which is not in english alphabet, I can not get the result

Whal else should I change ?

Link to comment
Share on other sites

These are what I use actually :

 

mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'");

 

also added mysql_set_charset('utf8'); after it and tried

its same, just works with latin characters.

Link to comment
Share on other sites

The thing I have noticed is that ;

the data in DB is like :

facileæ

 

it prints right when I search for "facile"

but most prob can not find when I search for "facileæ" cause of "æ" needs to be converted to æ

How can I convert it ?

 

 

I tried the query by phpmyadmin

 

where user like %facil%

and result :

facileæ

 

the

Link to comment
Share on other sites

That is why it doesn't work. You didn't store it correctly.

 

it has to look like this in the database:

facileæ

 

otherwise you can't search for it.

 

doing a search like this:

 

select * from table where column like '%cile&ael%';

 

would probably work.

 

basically you have it stored incorrectly, and you will probably have to reinsert it with the correct values.

Link to comment
Share on other sites

but utf8_unicode_ci is the correct charset for my needs.

even those chars are like that in the db, I dont have even one problem while printing them.

As I said just the searching function does not work.

I tried others, whenever french chars are working, cannot print greek chars then.

now both working right, unfortunately I have no other option about charset.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.