Special Characters

Asked

Viewed 39 times

0

I wonder how I can make to use special characters like ", when I insert one of these in my database it changes to "?"

Any hints on how I can do this ? I have no idea about it

  • 1

    It seems that the database ta converting them automatic to "?" am using var dump and they are being sent right to the database

  • 1

    What encoding are you using in your database? Try using mysql_real_escape_string() to give the "Encode" in the string and then insert it into the database;

  • 1

    utf8 general ci

  • 1

    See if this helps you: http://stackoverflow.com/questions/2122866/how-to-insert-special-character-in-mysql-via-php-and-display-on-html-page

  • Are you sure the comic is converting to ?? Did you try to retrieve these characters from the BD, send them to the customer and try to display them? If you consult the BD via a console or other tool whose fountain do not support the inserted characters, it will display them as ? - although it keeps storing the correct value.

  • 1

    Yes this converting

  • 1

    When I send one of these ate this error appears in phpmyadmin Warning: #1366 Incorrect string value: 'xE2 x9C x9F' for column 'task' at Row 1

  • 1

    @Rafaelwithoeft These as ™ work normal

  • Strange just tested here and worked smoothly with its characters. Already checked the result of the sql string before having it run?

  • 1

    I’m using wamp I’ll test it on the server

  • 1

    Even so it didn’t work, now I even tested by inserting directly into phpmyadmin and changed to "?"

  • 1

    Try changing the specific field for utf-8 collation

  • 1

    If I put them in my html they appear then my support source for them...

  • 1

    @Rafaelwithoeft changed the default field to utf8_general_ci and it worked... now I don’t understand the reason why

  • 1

    Well... also do not know the reason just analyzing better even to try to find out, but at least solved then; Put the solution as answer...

  • This was probably because the encoding of the PHP and database files was different (iso/latin1 and utf8). http://rubsphp.blogspot.com.br/2011/07/problemas-com-charset-nunca-mais.html

  • To use these characters you must use utf-8, see this should help you: http://answall.com/a/43205/3635

Show 12 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.