Jump to content
The Uniform Server Community

character encoding


bobgodwin
 Share

Recommended Posts

Wondered why the character encoding isn't being picked up right. I have doc types declared UTF-8 but they show up as ISO-8859-1. They're right online and on another WAMP server I run. I've tried several changes to various .ini (php, apache) files, but can't get it to work.

Link to comment
Share on other sites

did you SAVE the text/html file as UTF-8 ?

 

declerations dont work if the chars to show are "ISO" chars, for example pasting from another document, some editors might not "migrate" the chars (they try to map the chars into UTF-8 with custom functions - wont always work. same for editors not supporting UTF-8/UTF-16)

Link to comment
Share on other sites

  • 2 weeks later...

for parsing through php, this code line helps

 

header("Content-Type: text/html; charset=UTF-8");

 

or any charset. usually: this forces the "delivery" of the text by to a specific charset

 

headers have to be set before anything else. (the first line in your script right after <?php. make sure you have no whitespaces before that !

Link to comment
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...