note 70812 deleted from function.get-html-translation-table by googleguy

From: Date: Tue, 22 Oct 2013 14:59:32 +0000
Subject: note 70812 deleted from function.get-html-translation-table by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-197278@lists.php.net to get a copy of this message
Note Submitter: trukin at gmail dot com ---- There have been issues when hispanic websites or other websites dont use the corrent collision in mysql. Some problems result that the accents (éä ... ) result in weird characters when a backup is done and restored later on. Or when database is changed to another one. To fix this try something like this function accents($text){ foreach(get_html_translation_table(HTML_ENTITIES) as $a=>$b){ $text = str_replace($a,$b,$text); } return $text; } and use as accents("Hello ....... WITH ACCENTS") and it will return the escaped string.

« previous php.notes (#197278) next »