Skip to content

utf-8 issues

edited March 2013 in Troubleshooting

I am trying to translate Sendy to hebrew.
I changed the collation of the name field in the subscribers table.to utf8_general_ci in order to import csv files which include hebrew characters (or arabic and so on).
So now, when I add subscribers manually, the name field is empty in the db!

Comments

  • BenBen
    edited March 2013

    Hi @scalar,

    I googled and found this:

    Just in case someone in the future stumbles upon this message for the same problem - I found out that setting the server variables "character_set_server" and "character_set_system" (I don't remember which one did the trick!) to utf8 solves the problem (assuming you are using UTF-8 as the connection character set - which you should anyway...)

    Source: http://forums.mysql.com/read.php?103,6544,7446#msg-7446

    Ben

  • Thanks but i am missing something. he says "assuming you are using UTF-8 as the connection character set" (which is correct). How do i set it in your code ?
    Look here http://php.net/manual/en/mysqli.set-charset.php
    I think that has to be done in the functions file

    for mysql

  • Hi @scalar,

    Place the following code at the end of the functions.php code before the closing php tag:

    mysqli_set_charset($mysqli, "utf8");

    Ben

This discussion has been closed.