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
https://forums.phpfreaks.com/topic/233958-problem-with-chars/
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
https://forums.phpfreaks.com/topic/233958-problem-with-chars/#findComment-1202761
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
https://forums.phpfreaks.com/topic/233958-problem-with-chars/#findComment-1202783
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
https://forums.phpfreaks.com/topic/233958-problem-with-chars/#findComment-1202867
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
https://forums.phpfreaks.com/topic/233958-problem-with-chars/#findComment-1203072
Share on other sites

Archived

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

×
×
  • 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.