storeship Posted November 10, 2015 Share Posted November 10, 2015 I consider myself to be a seasoned PHP developer but am completely stumped on this one. A client sent me a html page that he required me to convert, it was a template, unfortunately it looks like he developed it in word and converted it. It kept returning Chinese characters, i eventually decided to rip all the code out the page and replace it with another template i had that worked fine. Both PHP pages are identical codewise, one is returning oriental characters and the other is rendering perfectly fine?? I have placed both into Winmerge and that is confirming that both files are identical? Do i have a problem with my PHP installation? You can check both files here: http://www.storeship.co.uk/mhg.php http://www.storeship.co.uk/manuscript.php Any help would be appreciated as never come across anything like this before? Regards Paul Quote Link to comment https://forums.phpfreaks.com/topic/299428-bizarre-problem/ Share on other sites More sharing options...
Solution mac_gyver Posted November 10, 2015 Solution Share Posted November 10, 2015 the character-encoding for the first link/page is - utf-16le, which is treating characters as consecutive 2byte/16bit entities. the character-encoding for the second link/page is - utf-8 just changing the character encoding that the first file is saved with may fix the problem. Quote Link to comment https://forums.phpfreaks.com/topic/299428-bizarre-problem/#findComment-1526150 Share on other sites More sharing options...
storeship Posted November 10, 2015 Author Share Posted November 10, 2015 Yep, it was saving with' include Unicode Signature(BOM)' in Dreamweaver, unticked that and all good. Appreciate your help, will remove files now. Quote Link to comment https://forums.phpfreaks.com/topic/299428-bizarre-problem/#findComment-1526151 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.