Encoding problem, can't solve it

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • david

    #1

    Encoding problem, can't solve it

    Text I get:
    # stat¸ pakeitimai
    # em s paskirties keitimas

    As you can see some letters isn't exactly as it should be. It's in
    UTF-8 in MySQL (utf8_lithuania n_ci) and I transfer using utf8
    encoding. The problem I need those letters, I think those should be
    called latin. But where they are gone I can't image. I tried a lot
    conversations tools but they didn't help me...

  • david

    #2
    Re: Encoding problem, can't solve it

    It could be ridiculous, but right now I decided to use this function:
    function fix_string($str )
    {
    $bad = Array(' ', ' ', '¿', ' ', ' ', ' ', '¸', ' ', ' ', ' ', ' ',
    '¯', ' ', ' ', ' ', '¨', ' ', ' ');
    $fix = Array('à', 'è', 'æ', 'ë', 'á', 'ð', 'ø', 'û', 'þ', 'À', 'È',
    'Æ', 'Ë', 'Á', 'Ð', 'Ø', 'Û', 'Þ');

    return str_replace($ba d, $fix, $str);
    }

    Comment

    Working...