php - What is the right choice of XML encoding for Latin extended -


ok, need creat db interaction latin extended caracters such as: ŠšĐđČčĆ掞 etc..

now 1 way set encoding utf (which result db data caracters converted Å¡Å¡Å¡ (using latin1_swedish_ci colation)..

this works fine while fetching data, unless need limit length of th field, problem when split occures in middle of Å¡, result caracter ?? instead of Ć..

so simple question, encoding use in html, , colation use inside db retain original caracters.

thank you

`

<!doctype html> <head><meta charset="utf-8">  </head> <body>  <?php  $dbx = new mysqli('localhost','root','pass','dbtester') or die ('error   connection');  $query = $dbx->prepare ("select id, cont dbtester");                                    $query->execute(); $query->bind_result($id, $cont);  while($query->fetch()):       echo $id;      echo $cont;  endwhile;  ?>  </body> </html>` 

change storage encoding utf-8 , collation utf8_general_ci (you don't speak swedish you?)

set encoding of mysql client utf-8, too.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -