I have a nightmare when i updatePHP from version 5.2.10 to 5.3.28.
HTML is UTF8, database is in UTF8. Withversion 5.2.6 everything works fine, complete web applications shows in the HTML page "čćšđČĆŽŠĐ".
In Previous version of PHP i did not have problem with UTF8:
$_SESSION['Koef'] = array(1 => "Customer", 2 => "Proračun");
now i have, č can't be saved into DB table sessions.
now i need to do : $_SESSION['Koef'] = array_map("utf8_decode",array(1 => "Stranka", 2 => "Proračun"));
but č is now displayed as Ä in HTMLpage.
When i read data from table it is UTF-8: mb_detect_encoding($s) //$s is value from DB mysql select. returned value is UTF-8
In previos version of PHP 5.2.10 value in DB Ä was displayed on HTML as č, also saving č was possible in DB it was converted to Ä, everthing works correctly. I have more than 100 table(Latin1), 200 webpages. I develop application for 3 years and have none issuses regardingof encoding when upgrading was done.
i also add mysql_set_charset("UTF-8"); did not affect changes
In the HTML page was added: is corectly displayed on browser HTML page: ŠĐČĆčćšđ
The change was made in DB table: value Ä in table column was changed to č. When data is read from db is in HTML page is writen č.
what ist the best way to update web application withno big changes that php will work same as 5.2.10? What did i misswhen i update PHP version?
Thakyou for your help.
Regards, Dani P.S. Sorry for spaces my toshiba worth 1500€ space key is not working properly.