I need help with converting a Database to UTF-8

  • Answered
According to your reference on


we followed your solution and run the php program, but this gave me the following error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character set set COLLATE hebrew_general_ci'

Please help me solving this problem
Hello Karthej, and thanks for your question. It looks like you might have possible mistyped something from our how to convert a database to UTF-8 guide. The part of your query it seems to be complaining about is 'character set set COLLATE hebrew_general_ci' That line should read CHARACTER SET $char_set COLLATE hebrew_general_ci" in your code. Notice how after SET it should use the $char_set variable set at the very top of the script by default to $char_set = 'new character set'; . It looks like you've possibly set that variable to just be set, and so your SQL query has set set COLLATE in it, instead of the correct set utf8 COLLATE hebrew_general_ci that it should. Please let us know if that fixes your issue. - Jacob