Jump to content

Charset Questions - Very Confused!


Recommended Posts

I need help! So confused! I use notepad++ by the way.When I encode my PHP file in ANSI (Format>Encode in ANSI>Save) with the characters

¢ Â 的

it displays as

¢ Â 的 (with charset ISO-8859-1

When I change the PHP file's encoding to UTF-8 (Format>Encode in UTF-8>Save) it displays

 ¢ Â 的 (with charset ISO-8859-1)

But if I set the charset to utf-8 it displays correctly, regardless of file encodingSo what I would like to ask is, how come it displays differently with different file encodings but the SAME CHARSETs?EDIT: PLEASE REPLY WITH QUOTE TO LOOK AT ACTUAL OUTPUTS. CHARACTERS DOESN'T DISPLAY ACCURATELY IF YOU VIEW IT FROM THE BROWSER.

Edited by gameboyz
Link to comment
Share on other sites

Guest FirefoxRocks

The characters:

Is a byte-order mark. If you encode something in UTF-8, the charset should (must?) be set to UTF-8 as well.It is best to use UTF-8 or UTF-16 to encode your webpages to ensure compatibility, however this may not be the case because the BOM can disrupt PHP in certain cases.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...