problem encoding cyrillic to latin

Discussion in 'PHP' started by bumbar, May 19, 2009.

  1. #1
    Hallo!

    I have a problem with the display of result in Latin browser

    translated through Google translator from Bulgarian to English, but the browser appears errors enkoding

    I used iconv, mbstring by PHP, but problem still exists ...

    here is simple code

    
    require('googleTranslateTool.class.php');
    
    // initiate the translator with the settings from english to spanish, for full language list check the main class file
    $translator = new googleTranslateTool('bg','en');
    
    $result = $translator->translate_Text('как се чувстваш');
    
    if ( $result===false ) echo $translator->return_error();
    else echo $result;
    
    echo iconv("windows-1251", "utf-8", $result);
    
    PHP:
    thanx.
     
    bumbar, May 19, 2009 IP