Documentation Home
MySQL 5.6 リファレンスマニュアル
Download this Manual
PDF (US Ltr) - 26.8Mb
PDF (A4) - 26.9Mb
HTML Download (TGZ) - 7.1Mb
HTML Download (Zip) - 7.2Mb キリル文字の文字セット

ベラルーシ語、ブルガリア語、ロシア語、ウクライナ語、セルビア語 (キリル) とともに使用するキリル文字の文字セットおよび照合順序を以下に示します。

  • cp1251 (Windows キリル文字) 照合順序:

    • cp1251_bin

    • cp1251_bulgarian_ci

    • cp1251_general_ci (デフォルト)

    • cp1251_general_cs

    • cp1251_ukrainian_ci

  • cp866 (DOS ロシア語) 照合順序:

    • cp866_bin

    • cp866_general_ci (デフォルト)

  • koi8r (KOI8-R Relcom Russian) 照合順序:

    • koi8r_bin

    • koi8r_general_ci (デフォルト)

  • koi8u (KOI8-U ウクライナ語) 照合順序:

    • koi8u_bin

    • koi8u_general_ci (デフォルト)

User Comments
  Posted by Alexander Kushnirenko on August 5, 2004
Imagine you have a table which has column 'name' in UTF-8 and column 'namew' in cp1251. Both columns have some cyrillic information in it. You use xterm with koi8r character set to work with your database. There are 3 steps you need to do to work with your table.

1. alter your table to include information about character sets that are used in your table (see section Converting 4.0 Character Columns to 4.1 Format). Most of us have to do this step because usually you inherit your tables from MySQL 4.0 If you created your table and specified character sets there is no need to do this step. Verify your actions using SHOW FULL COLUMNS FROM table_name.

2. SET NAMES KOI8R. (see section Connection Character Sets and Collations for details). It explains that your I/O is done in KOI8R

3. SELECT name,namew FROM table_name;
Database will convert UTF8,cp1251--> koi8r for you and will produce results in koi8r character set that you can see on your terminal. You can also do
UPDATE table_name SET name='koi8r-typed-russian-word'
and database will convert your string that you typed in koi8r into UTF-8 format and store in your table.

  Posted by milos korac on March 31, 2005
so, i have a real estate web site and we have database in 5 languages, one of them is russian. So why simple, when it can be compicated? First i gave my secretary access to myadmin so she can work with russian (Natasha), and we had trouble with russian again search machines, topics, forums etc. and it was the point with encoding ex. KOI8-R as it was used on Unix, its a table with a russian characters and on the top andon the left side you have a characters that are encoding one russian letter...
| koi8r | KOI8-R Relcom Russian | koi8r_general_ci | 1 | 

maybe to make test with this:



if (!
$link) { 
printf("Connect failed: %s\n"mysql_error()); 

$charset mysql_client_encoding($link); 

printf ("Current character set is %s\n",$charset); 




  Posted by Vasko Tsintsev on November 29, 2005
It's true about the results like "???????" . In versions of PHP >5.0.* and MySQL 4.1.14 , and if you try to get result in cyrillic , you will see just "????". There is sample solution : immediately after mysql_connect() , and mysql_select_db() add this lines :
mysql_query("SET NAMES CP1251");
Thats all ... ! Good luck ... !
Sign Up Login You must be logged in to post a comment.