Ce mémo a été publié le 16 juin 2010 et peut contenir des informations qui peuvent être incomplètes, non mises à jour voir erronées du fait de son ancienneté.
N'hésitez pas à compléter votre recherche sur des articles plus récents.
ž : Z diacritée
Ce genre de caractères posent parfois des problèmes.
Voici une solution de transcodage…
Solution ici : http://www.php.net/manual/en/function.strtr.php#59920
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<? // Windows-1250 to ASCII // This function replace all Windows-1250 accent characters with // thier non-accent ekvivalents. Useful for Czech and Slovak languages. function win2ascii($str) { $str = StrTr($str, "xE1xE8xEFxECxE9xEDxF2", "x61x63x64x65x65x69x6E"); $str = StrTr($str, "xF3xF8x9Ax9DxF9xFAxFDx9ExF4xBCxBE", "x6Fx72x73x74x75x75x79x7Ax6Fx4Cx6C"); $str = StrTr($str, "xC1xC8xCFxCCxC9xCDxC2xD3xD8", "x41x43x44x45x45x49x4Ex4Fx52"); $str = StrTr($str, "x8Ax8DxDAxDDx8ExD2xD9xEFxCF", "x53x54x55x59x5Ax4Ex55x64x44"); return $str; } ?> |