1

I have a database that's seems to be on latin1_swedish. I need to add some more text to it. The new text contains some Brazilian words. Example:

tilápia

Cachaça

... The old text that is in the db has these words too, but it's like this:

tilápia

The PHP file is converting it to the real word, using the right accent. How can I add these texts and keep PHP converting files? For example, add tilápia on my table and mysql keeps it as tilápia.

Thanks, hope it's not confusing.

Segfault
  • 8,036
  • 3
  • 35
  • 54
Lucca Zenobio
  • 192
  • 1
  • 1
  • 9

1 Answers1

0

While the collation should definitely be something more generic like utf8_generic, that won't change how things are displayed. MySQL will store whatever you throw at it and will return exactly the same thing when you ask for it. Hence, you just have to make sure to use the same encoding for reading and writing. In general it's a good idea to use utf8 through the whole application (including db). For that you would need to convert the content in your db.

Tim
  • 1,315
  • 1
  • 14
  • 35