1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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