0

Currently having issues with the translation script handling special characts mainly from Czech language. A administration is allowed to translate my platform from english to it's own language, however when they do some of the characters are getting stored as ? instead of the html entities.

For example the following word: nepřetržitě Is getting stored as: nep?etržit?

When saving to the database I use htmlentities(value) before inserting. What should I do to get this working?

Thank you.

Roel
  • 47
  • 6
  • 1
    Does this answer your question? [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – CBroe Jun 25 '20 at 08:32
  • 1
    _“When saving to the database I use htmlentities(value) before inserting.”_ - that is wrong to begin with. Don’t _mess_ with the data at this point, store it in its original form. Applying any function like this should only happen when you _output_ the data into a specific context. – CBroe Jun 25 '20 at 08:33
  • Dear CBroe, thanks for your quick reply, I removed the htmlentities function and insert the data plain, however it still gets saved with ? instead of the real character. When I try to store the same data directly in SQL it gives me a format string error. Looks like in this case Codeigniter is also doing something with the data before saving. – Roel Jun 25 '20 at 08:48

0 Answers0