japapa Posted February 14, 2012 Posted February 14, 2012 Hi. I have some problem with phpwhen i try to write a php(or html) that have unicode chars and upload it on host all of chars convert to ? mark when i show it in the mozilla , opera or other browsersi save the php with utf-8 encoding and set the page encoding to utf-8 but i can't slove this problem you can see an example herehttp://farachat.tk/test.php soure code: http://farachat.tk/tes.htmlwhat i should do? please Help meSorry for my bad english 1
Wizard Posted February 14, 2012 Posted February 14, 2012 Have you tried the recommendations on this page (especially the section on Web Development)? http://tlt.its.psu.e...uage/farsi.html
japapa Posted February 14, 2012 Author Posted February 14, 2012 <p>i try this instruction and use from meta tags in my webpage but i have problem yet.when i upload my php files on other hosts i dont have any problem and they work is successfull, But when upload them on the my free host from HelioHost it replace all of persian charachters with ?(question mark) also just php have this problem And when i get a unicode data from mySql database its not have problem Example Source code<?phpecho "متن فارسی";?> viewed page on other host متن فارسیview page on HelioHost ??? ???? i Think heliohost dosen't support Unicode Php ....is this Correct?
Wizard Posted February 14, 2012 Posted February 14, 2012 Don't know, let me check. Which server are you on?
japapa Posted February 15, 2012 Author Posted February 15, 2012 my server is johnny.heliohost.org hey the speed of this server is slow some time i hope its under DDoS attack
Ashoat Posted February 15, 2012 Posted February 15, 2012 The problem was that you have a U+EFFF character at the top of your file. It's invisible to most editors, but it signifies UTF-16 encoding and the PHP parser might have caught it and turned off UTF-8. It's known as the byte order mark. I copied your tes.html into test2.php and removed the byte order mark and it seems to work now.
japapa Posted February 16, 2012 Author Posted February 16, 2012 ok.but how i can remove this U+EFFF charachter?
japapa Posted February 16, 2012 Author Posted February 16, 2012 file test2.php that you make shows question mark toofarachat.tk/test2.php
Wizard Posted February 16, 2012 Posted February 16, 2012 Try opening the file in notepad and saving as UTF-8. 1
bdistler Posted February 17, 2012 Posted February 17, 2012 what text editor are you using ? if it is notepad you need to==>GO TO NOTEPAD, IN SETTINGS->PREFERENCES->New Document/Default Directory-> (Select UTF-8 without BOM and select apply to opened ANSI files)<== 1
japapa Posted February 17, 2012 Author Posted February 17, 2012 i change my php editor and know i dont have problem thank from all of you.I love heliohost
anush Posted February 17, 2012 Posted February 17, 2012 @japapa you will surely have a good hosting here.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now