|
Posted by shimmyshack on 03/21/07 16:54
On 20 Mar, 18:01, matt...@gmail.com wrote:
> The following string:
> "US generals ‘will quit’ if Bush orders Iran attack"
>
> is being stored in my table as:
>
> "US generals ‘will quit’ if Bush orders Iran attack"
>
> The only PHP function I'm applying to the string is
> mysql_real_escape_string, and that doesn't appear to be the root of
> the problem. I'm using utf8_general_ci as my collation.
>
> Forgive my ignorance.
so if you use htmlentities or any other function you must use the
utf-8 mode.
htmlentities( 'string' ENT_QUOTES, 'UTF-8' );
and I have read might be wrong - that the connection between php and
mysql is never utf-8, but that this is overcome by letting both sides
know to use utf-8
one thing though, even if its hard to do at first, it is possible, I
wish I ahd written down everything I did, because it's working for me
now, and I run 10 alphabets on Php/MySql with no issues this way,
carefully using functions, using mb_ by default, or only utf-8 aware
ones.
Navigation:
[Reply to this message]
|