יום ראשון, 17 בנובמבר 2013

Unknown OS character set 'cp862 and Switching to the default character set 'latin1' in mySQL

If you are trying to run some sql  text file in mysql and get an error like this:

C:\wamp\bin\mysql\mysql5.6.12\bin\mysql.exe: Unknown OS character set 'cp862'.
C:\wamp\bin\mysql\mysql5.6.12\bin\mysql.exe: Switching to the default character set 'latin1'.

You get the error because the engine is use the default. To set the default to UTF-8 in "my.ini" file you have to add this lines:
[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
save the file and restart the service.

2 תגובות:

  1. תודה ! עזרת לי להסיר עוד אבן נגף בדרך לעברית ב mysql.

    השבמחק