Re: issue with adding accents through php
Posted by: Rick James
Date: February 04, 2011 09:50AM

Look at the source of the web page. Is there a <meta...> statement declaring the characterset? And what is the setting in your browser? Those things (I think) control the character set deliver to the server.

Now look at the bytes you get back from the browser; are they utf8, or something else. Display the hex, don't trust 'print' or 'echo'. Show me the hex, plus what you expect, if needed.

latin1 for any any French accents is a single byte. UTF8 for such is always 2 bytes. Even simpler: If the number of bytes is more than the number of characters, then it is probably utf8; else latin1. (Caution; I am assuming Western European characters, not latin2, etc, etc)

Options: ReplyQuote

Written By
January 26, 2011 10:28AM
Re: issue with adding accents through php
February 04, 2011 09:50AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.