note 91749 deleted from function.strtr by danbrown

From: Date: Wed, 24 Jun 2009 16:25:18 +0000
Subject: note 91749 deleted from function.strtr by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-157378@lists.php.net to get a copy of this message
Note Submitter: lev at taintedthoughts dot com ---- The code provided by allixsenos at gmail dot com, didn't work for me. It took me a while to figure out while my characters weren't being replaced, but I eventually discovered it was related to the character encoding. If you can't get allixsenos's code to run, in the beginning of the function add this: $string = utf8_encode($string); With this in place, the characters began to translate just as expected. If that doesn't work, you can always try utf8_decode instead, as your situation may be the complete opposite of mine.

« previous php.notes (#157378) next »