ccc Posted December 29, 2009 Posted December 29, 2009 I have a utf8 encoded "php" file on http://agamanikaya.heliohost.org/p.php which is shown the words uncorrectly by "?". While if I save it as a "htm" file encoded the same utf8, the words are shown correctly as on http://agamanikaya.heliohost.org/index.htm, but, of course, it does not work the "php" portion. Would you please to help me fix this problem: let a utf8 encoded "php" file work to show their words correctly?
Byron Posted December 29, 2009 Posted December 29, 2009 This support request is being escalated to our root admin.
Ashoat Posted December 29, 2009 Posted December 29, 2009 You had some weird whitespace character (U+FEFF) at the start. I removed that, and it looks fine now.
ccc Posted December 29, 2009 Author Posted December 29, 2009 You had some weird whitespace character (U+FEFF) at the start. I removed that, and it looks fine now. Where is the "weird whitespace character (U+FEFF) at the start" ( I mean which line ) you deleted? The same trouble on http://agamanikaya.heliohost.org/a.php , even I copy from http://agamanikaya.heliohost.org/p.php for the 1-9 lines. Woukd you please to let me know to do by myslef? Because I have a lot of such kind of php files(encoding by utf8 and work normal on other web) want to work here. Thank you so much!
Ashoat Posted December 30, 2009 Posted December 30, 2009 I accidentally wiped a.php before figuring out what was going on. Sorry; can you recreate it?
ccc Posted December 30, 2009 Author Posted December 30, 2009 I accidentally wiped a.php before figuring out what was going on. Sorry; can you recreate it? http://agamanikaya.heliohost.org/a.php was re-uploaded it work in other web normally as aaĀĀṬ okall oka okt okb bbāāṭ
Ashoat Posted January 1, 2010 Posted January 1, 2010 I'm really unsure at this point. Is the PHP file encoded in UTF-8?
ccc Posted January 1, 2010 Author Posted January 1, 2010 I'm really unsure at this point. Is the PHP file encoded in UTF-8? Yes, it is. How did yo make it? I still have php files running abnormal here whle normal on other web. Would it be the setting problem on the server? The followings was quoted from http://www.w3.org/International/questions/...encoding#server Step 3: Ensure that your server does the right thing Although your data is in UTF-8 and you have declared it in the page, your server may still be serving the page with an accompanying HTTP header that says it is something else. The declaration in the HTTP header will override information inside the page. To address this you need to check whether this is actually a problem or not, and then, if it is, take steps to rectify it. Server admin privileges are needed to change the encoding sent in the HTTP header, though you may be able to do so yourself even if you are serving files via an ISP. Consult your server admin person. See the explanation of one way to do this for an Apache server.
Byron Posted January 1, 2010 Posted January 1, 2010 The cpanel file manager gives you the option to use different encodings including UTF-8 when you first create a page and start to edit it. Have you tried that? I think this option can be overidden in Settings at the top of the file manager page.
ccc Posted January 1, 2010 Author Posted January 1, 2010 The cpanel file manager gives you the option to use different encodings including UTF-8 when you first create a page and start to edit it. Have you tried that? I think this option can be overidden in Settings at the top of the file manager page. i did it. i uploaded a.php again and enter to cpane/file manager/code editer. it shows this file code is utf-8. i saved it again using cpane/file manager/code editer/save changes. but now http://agamanikaya.heliohost.org/a.php still shows abnormally.
Byron Posted January 1, 2010 Posted January 1, 2010 When you go inside your edit page, does it show the correct characters or is it showing abnormally too? If it's showing abnormally then it got saved that way and you need to re-edit the page. Edit: Here's your problem. Remove this right before the <html> tag from this: <html> to this: <html> http://byrondallas.heliohost.org/test/test-index.php
ccc Posted January 2, 2010 Author Posted January 2, 2010 Here's your problem. Remove this right before the <html> tag from this: <html> i enter cpane/file manager/code editer to check a.php. and there is no "<html>" as you mentioned, only "<html>". it also show the correct characters. i saved it. but still shows abnormally. my computer is window xp, traditional chinese (big5) version. by the way, a.php runs normally on other web.
Byron Posted January 2, 2010 Posted January 2, 2010 Your showing those characters on this page that I uploaded: Look in the upper lefthand corner: http://agamanikaya.heliohost.org/index.htm When I uploaded that page and renamed it with a .php extension it showed abnormally untill I deleted those characters. Then it was ok. http://byrondallas.heliohost.org/test/test-index.php
Recommended Posts