xcoderx Posted December 1, 2008 Share Posted December 1, 2008 guys im getting probelms with translating language to russian because of utf-8, special chatectors wont show. how do i fix it? Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/ Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 currently im using <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> shall i change it to <meta http-equiv="Content-Type" content="text/text; charset=UTF-8" /> please help special character is not showin Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702802 Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 help me please :'( Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702846 Share on other sites More sharing options...
btherl Posted December 1, 2008 Share Posted December 1, 2008 If you are using utf8 in your html, then yes you should declare that with http-equiv. You can also set a header in php like this: header('Content-type: text/html; charset=utf-8'); Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702852 Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 bro i did that i changed the meta to <meta http-equiv="Content-Type" content="text/text; charset=UTF-8" /> in my header.php but it still do no show special character Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702855 Share on other sites More sharing options...
dimond345 Posted December 1, 2008 Share Posted December 1, 2008 For multilanguage support I use in system UTF-8 every there. After this: If I whant to change my code page in shown site I use $this->ready_page = mb_convert_encoding($this->ready_page,SHOW_SITE_ENCODING,INTERNAL_ENCODING); Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702859 Share on other sites More sharing options...
btherl Posted December 1, 2008 Share Posted December 1, 2008 If you set your browser manually to show utf8, does it work? Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702860 Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 in my browser utf8 is already working only in my site it do not show i just cant seem to make it show dont know whats goin wrong Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702865 Share on other sites More sharing options...
btherl Posted December 1, 2008 Share Posted December 1, 2008 If you view your site and set your browser to view it as utf8, does it display properly? If yes, then the problem is how to tell the browser to use utf8. If no, then the problem is your code is not generating utf8. Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702869 Share on other sites More sharing options...
Mchl Posted December 1, 2008 Share Posted December 1, 2008 You should also save your source files in utf-8. Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702876 Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 no its in ANSI shall i save it to utf8? ??? Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702911 Share on other sites More sharing options...
Mchl Posted December 1, 2008 Share Posted December 1, 2008 You should. UTF-8 without BOM (Byte Order Mark). Notepad++ has the ability to convert existing files. Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702918 Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 oh i did not know that guess i have to sart it all over again thank you soo much for sharing the knowledge. im really greatful Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702942 Share on other sites More sharing options...
xcoderx Posted December 1, 2008 Author Share Posted December 1, 2008 my smartftp never let me save my files with special characters Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702943 Share on other sites More sharing options...
[-_-] Posted December 1, 2008 Share Posted December 1, 2008 Make sure you test it in different browsers before using it. I tried this a while back for making smiley faces using symbols and when I went to my site all that showed was a weird character in the top left corner and the rest of my page disapeared. Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702956 Share on other sites More sharing options...
Mchl Posted December 1, 2008 Share Posted December 1, 2008 That was most likely BOM Looks like this:  Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-702960 Share on other sites More sharing options...
xcoderx Posted December 2, 2008 Author Share Posted December 2, 2008 it didn help even after saving my php files in utf8 all i get is ? in special character alphabets :'( Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703707 Share on other sites More sharing options...
xcoderx Posted December 2, 2008 Author Share Posted December 2, 2008 here is my header.php <?php include("functions.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/text; charset=UTF-8"> <link href="style.css" rel="stylesheet" type="text/css" /> <title><?php echo $page_title; ?></title> </head> <body> what could be wrong? Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703715 Share on other sites More sharing options...
haku Posted December 2, 2008 Share Posted December 2, 2008 Are you pulling the info from a database? Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703723 Share on other sites More sharing options...
xcoderx Posted December 2, 2008 Author Share Posted December 2, 2008 not database its from flatfile all data stored in php file Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703725 Share on other sites More sharing options...
haku Posted December 2, 2008 Share Posted December 2, 2008 And are those files also saved in UTF-8? Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703726 Share on other sites More sharing options...
xcoderx Posted December 2, 2008 Author Share Posted December 2, 2008 well i guess its not but im not tryin it with those but only the site template, in my admincp.php etc special character showing ok but only in few files like index.php etc it do not show Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703729 Share on other sites More sharing options...
haku Posted December 2, 2008 Share Posted December 2, 2008 If all your files aren't the same encoding, you will run into problems. Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703730 Share on other sites More sharing options...
xcoderx Posted December 2, 2008 Author Share Posted December 2, 2008 bro in my admincp etc im not using css i just figured out only when using css this is happening Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703735 Share on other sites More sharing options...
sKunKbad Posted December 2, 2008 Share Posted December 2, 2008 Something that has not been mentioned yet, and is worth checking, is the default encoding set in php.ini. If it is not UTF-8, then change it. Quote Link to comment https://forums.phpfreaks.com/topic/134948-solved-utf-8-charset-issue/#findComment-703744 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.