1

I have that problem that my mysql database stopped reading the special characters from languages. By special characters I mean é, á, ő and more. (Hungarian) And I have set the charset to utf8_unicode_ci for the database and for the fields.

I get something like that:

éééáááéééppqőőőééÃ
MrAnonymusz
  • 33
  • 2
  • 8
  • If this doesn't solve the problem: https://stackoverflow.com/questions/279170/utf-8-all-the-way-through/279279 ... I'll eat my proverbial hat (not one of my real ones, they probably wouldn't taste good ... maybe a Cornetto that's upside down pretending to be a witches hat). – CD001 Jun 01 '17 at 08:52
  • I'll see that mysqli_set_charset maybe that solves my problem because I don't really have much access to the database (I mean .ini or something like that) because I have the database on a webhosting... – MrAnonymusz Jun 01 '17 at 08:56
  • Possible duplicate of [UTF-8 all the way through](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – CD001 Jun 01 '17 at 08:58
  • And what to replace with "$link" ? the query ? "$some = mysqli_query(.....)" ? – MrAnonymusz Jun 01 '17 at 08:59
  • `$link` is the connector? e.g. `new mysqli()` (or `mysqli_connect()`); you shouldn't need to do anything with the queries themselves once you've got everything else in utf-8; i.e. the database (or tables), the database connector `mysqli::set_charset()` and the output e.g. PHP `header('Content-type: text/html;charset=utf-8`)` or the html `` – CD001 Jun 01 '17 at 09:05
  • Okay, I will correct my code and I have already on my page the "header(...)".... – MrAnonymusz Jun 01 '17 at 09:09
  • @CD001 I tried to add those but it is not working, Maybe the problem is in my code maybe If I send or post there u can verify it if is not wrong or something... – MrAnonymusz Jun 01 '17 at 09:16
  • Just update the question with your mysqli connector and set_charset code; you may need to update the data already in your database mind with something like MySQLs `CONVERT()` function: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert – CD001 Jun 01 '17 at 09:24

0 Answers0