note 70812 added to function.get-html-translation-table

From: Date: Sun, 29 Oct 2006 19:25:37 +0000
Subject: note 70812 added to function.get-html-translation-table
Groups: php.notes 
Request: Send a blank email to php-notes+get-119232@lists.php.net to get a copy of this message
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. ---- Server IP: 64.71.164.2 Probable Submitter: 68.227.126.7 ---- Manual Page -- http://www.php.net/manual/en/function.get-html-translation-table.php Edit -- https://master.php.net/note/edit/70812 Del: integrated -- https://master.php.net/note/delete/70812/integrated Del: useless -- https://master.php.net/note/delete/70812/useless Del: bad code -- https://master.php.net/note/delete/70812/bad+code Del: spam -- https://master.php.net/note/delete/70812/spam Del: non-english -- https://master.php.net/note/delete/70812/non-english Del: in docs -- https://master.php.net/note/delete/70812/in+docs Del: other reasons-- https://master.php.net/note/delete/70812 Reject -- https://master.php.net/note/reject/70812 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#119232) next »