mysql convert charset

Discussion in 'Databases' started by bumbar, Mar 11, 2014.

  1. #1
    Hello,
    I have data in my table with wrong records...
    Cyrillic, but incorrectly recorded.
    mysql table collation is utf8_general_ci .
    I get data from db table and the code below works properly:
    
    $str = "Уеб Дизайн, Хостинг, ДомейнР";
    echo iconv("UTF-8", "cp1251",$str);
    
    PHP:
    Actual recording is : Уеб Дизайн, Хостинг, Домейн

    But I need this to be done in the sql query.
    I use CONVERT(name USING utf8) but fetch the same wrong.

    Has anyone an idea?
    Thank you.
     
    Last edited: Mar 12, 2014
    bumbar, Mar 11, 2014 IP