Insertion with non-standard characters

Asked

Viewed 46 times

1

When I enter into Mysql database with PHP and PDO are entering strange and disordered characters, which may be wrong?

Here is a picture of a bank table: inserir a descrição da imagem aqui

My page has the parameter:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

And my bank has the following collation:

utf8 - utf8_general_ci

What I find strange is that in my application is normal, there would be some future problem, as SELECT of data?

  • The page and PDO are working on utf-8 tbm?

  • yes on my preview page is normal, just would like to take the doubt if this can complicate something in the future

  • 2

    This answer may help you http://answall.com/a/43205/3635

  • very good thanks 0/

  • 2

    One piece of information for your knowledge: the meta tag of the kind viewport has no relation to the characters. The ideal for this work is the tag <meta charset="tipo">.

1 answer

0

Try to modify the encoding of your editor, in Notepad++ for example it is possible to do it this way:inserir a descrição da imagem aqui

Test UTF-8 Encoding (without BOM).

Browser other questions tagged

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