Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Encoding problem, can't solve it
July 26, 2007, 10:41 am
rate this thread
# 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_lithuanian_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...
Re: Encoding problem, can't solve it
$bad = Array(' ', ' ', '¿', ' ', ' ', ' ', '¸', ' ', ' ', ' ', ' ',
'¯', ' ', ' ', ' ', '¨', ' ', ' ');
$fix = Array('à', 'è', 'æ', 'ë', 'á', 'ð', 'ø', 'û', '
þ', 'À', 'È',
'Æ', 'Ë', 'Á', 'Ð', 'Ø', 'Û', 'Þ');
return str_replace($bad, $fix, $str);