Jump to content

Bizarre Problem


Go to solution Solved by mac_gyver,

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/299428-bizarre-problem/
Share on other sites

  • Solution

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.

Link to comment
https://forums.phpfreaks.com/topic/299428-bizarre-problem/#findComment-1526150
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.