I made a site in bosnian language , the problem is that some letters appears as (?) i used the following encodings: latin2_swedish utf-8 ISO-8859-2 they didn't succeed !! what encoding is suitable for webpages and mysql database? Thanks
Well, I don't know where is the main problem with your code, but when I has the same problem, the iconv was the solution. For example, if you get the datas from form, and the character encoding works fine before you insert the datas to sql (eg. no problem with encoding if you try to echo/print the data), try the code above before the mysql_query command. I really don't know much about encoding, but I find this solution on google, and it's works for me.
use UTF-8. it shows every language correctly. change dbs charset and your pages encoding to UTF-8. also you may send an sql query every page "SET NAMES UTF-8".
sorry i just looked this line ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=21 ; try this. add this code to every page ; mysql_query("SET NAMES 'utf8'") after db section.
The EASIEST way to fix this is to modify your httpd.conf file... AddDefaultCharset Off If it's set to "On" you will get "?" for non-standard characters.
Dear MC_delta_T, I will try your solution , thanks Dear websecrets, Sorry,I can't understand what you said , please more explaination !! and where is this file??? Exactly I got (?) instead of every character !! waiting your explaination
httpd.conf is your Apache configuration file on your server... I'm assuming you are running Apache and have access to your server config files? If not then you'll have to use a scripted solution.
Dear MC_delta_T, thanks so much it worked with me thanks again ============ another question : how can i print arabic contenet of a variable ? like &g="Ø£"; echo $g; ??? the result is : ?