Insert special mysql characters and pull these identical values in the web application

Asked

Viewed 2,936 times

0

Good evening, I need to add values to the database by mysql so that they have special characters. I can add, but I can’t pull the values correctly, they end up coming with symbols in place of the special characters, for example...

Informatics
Inform tica

  • The two charset are equal. But still the problem persists.

  • Take a look at the answer to the linked question in the comment, there talks about it and shows various solutions.

2 answers

1


  • Make sure that in the database the values are correct (with accentuation).
  • You did not specify which language you are using, but by the tags I believe it to be PHP. Set the page charset correctly. Ex:

    header('Content-type: text/html; charset=ISO-8859-1');

  • Yes, yes php. The charset is correct.

  • Which charset you are using?

  • I’m wearing UTF-8

  • Change to ISO-8859-1

  • Okay, it worked, but now the whole page is coming with different symbols.

1

I managed to solve as follows, Thank you Fabiano Lira, Gato.

mysql_set_charset("utf8");

Browser other questions tagged

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