Hi

I asked this over at mysql forums but thought someone here may also have a solution...

When i try to insert some HTML code with a » in it, the insert will stop (with no error) at the first occurrence of it. All HTML is processed through mysql_real_escape_string (with PHP). Does the column type have to be a certain type? currently its 'text' with utf8_unicode_ci encoding.

Using MySQL.

If i echo the mysql_real_escape_string value before insert the » is shown as a block (an unkown character perhaps). Is there something i am doing wrong with the mysql_real_escape_string-ness?

Thanks

    the right angle quotation mark is part of the latin-1 set, but utf8 should support it, I'm not really sure, I guess you could try using the latin1 coalition or refer to the entity by its reference number & #187; and see how that goes. For the unicode version have a look here. Good luck.

      this is for a distributed package so i'd quite like to find a solution, any ideas? i need to use utf for foreign languages

        if any one else has this problem it's not php its javascript that causes the error (ajax requests). when escaping data it confuses the code so when php de-escapes it naturally it doesnt recognize the code. you'll need to build a de-jumbler function

          Write a Reply...