Title: [Plugin: Shortcode Exec PHP] Unicode Garbled
Last modified: August 19, 2016

---

# [Plugin: Shortcode Exec PHP] Unicode Garbled

 *  Resolved [taxihorn](https://wordpress.org/support/users/taxihorn/)
 * (@taxihorn)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-shortcode-exec-php-unicode-garbled/)
 * Before I start… thank you very much for a very, very useful plug-in. Not only
   has this simple framework allowed me to comfortably use shortcodes as a dabbling
   non-developer, but has also prompted me to learn and use PHP as I slowly replace
   a number of not-quite-right plug-ins with my own shortcode codes, and begin realizing
   the world of possibilities that come with custom fields. But I digress..
 * In order to use sort($array) on a set of strings with unusual characters, I borrowed
   and slightly modified a normalize() function from an online forum:
 *     ```
       function normalize ($string) {
   
       $table = array(
       ‘Š’=>’S', ‘š’=>’s’, ‘?’=>’Dj’, ‘?’=>’dj’, ‘Ž’=>’Z', ‘ž’=>’z', ‘?’=>’C', ‘?’=>’c', ‘?’=>’C', ‘?’=>’c', ‘À’=>’A', ‘Á’=>’A', ‘Â’=>’A', ‘Ã’=>’A', ‘Ä’=>’A', ‘Å’=>’A', ‘Æ’=>’AE’, ‘Ç’=>’C', ‘È’=>’E', ‘É’=>’E', ‘Ê’=>’E', ‘Ë’=>’E', ‘Ì’=>’I', ‘Í’=>’I', ‘Î’=>’I', ‘Ï’=>’I', ‘Ñ’=>’N', ‘Ò’=>’O', ‘Ó’=>’O', ‘Ô’=>’O', ‘Õ’=>’O', ‘Ö’=>’O', ‘Ø’=>’O', ‘Ù’=>’U', ‘Ú’=>’U', ‘Û’=>’U', ‘Ü’=>’U', ‘Ý’=>’Y', ‘Þ’=>’B', ‘ß’=>’Ss’, ‘à’=>’a', ‘á’=>’a', ‘â’=>’a', ‘ã’=>’a', ‘ä’=>’a', ‘å’=>’a', ‘æ’=>’ae’, ‘ç’=>’c', ‘è’=>’e', ‘é’=>’e', ‘ê’=>’e', ‘ë’=>’e', ‘ì’=>’i', ‘í’=>’i', ‘î’=>’i', ‘ï’=>’i', ‘ð’=>’o', ‘ñ’=>’n', ‘ò’=>’o', ‘ó’=>’o', ‘ô’=>’o', ‘õ’=>’o', ‘ö’=>’o', ‘ø’=>’o', ‘ù’=>’u', ‘ú’=>’u', ‘û’=>’u', ‘ý’=>’y', ‘ý’=>’y', ‘þ’=>’b', ‘ÿ’=>’y', ‘?’=>’R', ‘?’=>’r', ‘(‘=>”, ‘)’=>”, ‘,’=>”, ‘/’=>”,
       );
   
       return strtr($string, $table);
   
       }
       ```
   
 * The shortcode works great, and does everything it should, until I go back to 
   edit the code in the admin area, where it now looks like this:
 *     ```
       function normalize ($string) {
   
           $table = array(
               'Å '=>'S', 'Å¡'=>'s', '?'=>'Dj', '?'=>'dj', 'Å½'=>'Z', 'Å¾'=>'z', '?'=>'C', '?'=>'c', '?'=>'C', '?'=>'c', 'Ã�'=>'A', 'Ã�'=>'A', 'Ã�'=>'A', 'Ã�'=>'A', 'Ã�'=>'A', 'Ã�'=>'A', 'Ã�'=>'A', 'Ã�'=>'C', 'Ã�'=>'E', 'Ã�'=>'E', 'Ã�'=>'E', 'Ã�'=>'E', 'Ã�'=>'I', 'Ã�'=>'I', 'Ã�'=>'I', 'Ã�'=>'I', 'Ã�'=>'N', 'Ã�'=>'O', 'Ã�'=>'O', 'Ã�'=>'O', 'Ã�'=>'O', 'Ã�'=>'O', 'Ã�'=>'O', 'Ã�'=>'U', 'Ã�'=>'U', 'Ã�'=>'U', 'Ã�'=>'U', 'Ã�'=>'Y', 'Ã�'=>'B', 'Ã�'=>'Ss', 'Ã '=>'a', 'Ã¡'=>'a', 'Ã¢'=>'a', 'Ã£'=>'a', 'Ã¤'=>'a', 'Ã¥'=>'a', 'Ã¦'=>'a', 'Ã§'=>'c', 'Ã¨'=>'e', 'Ã©'=>'e', 'Ãª'=>'e', 'Ã«'=>'e', 'Ã¬'=>'i', 'Ã­'=>'i', 'Ã®'=>'i', 'Ã¯'=>'i', 'Ã°'=>'o', 'Ã±'=>'n', 'Ã²'=>'o', 'Ã³'=>'o', 'Ã´'=>'o', 'Ãµ'=>'o', 'Ã¶'=>'o', 'Ã¸'=>'o', 'Ã¹'=>'u', 'Ãº'=>'u', 'Ã»'=>'u', 'Ã½'=>'y', 'Ã½'=>'y', 'Ã¾'=>'b', 'Ã¿'=>'y', '?'=>'R', '?'=>'r', '('=>'', ')'=>'', ','=>'', '/'=>'',
           );
   
           return strtr($string, $table);
   
       }
       ```
   
 * So each time I want to edit the code, I first need to replace the latter garble-
   y code with the former. Is there away to store and retrieve the code without 
   the character-mapping issues?
 * [http://wordpress.org/extend/plugins/shortcode-exec-php/](http://wordpress.org/extend/plugins/shortcode-exec-php/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [M66B](https://wordpress.org/support/users/m66b/)
 * (@m66b)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-shortcode-exec-php-unicode-garbled/#post-1473287)
 * Thanks for reporting this.
    Your problem should be fixed in version 1.1. Please
   let me know if it is or not.
 *  Thread Starter [taxihorn](https://wordpress.org/support/users/taxihorn/)
 * (@taxihorn)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-shortcode-exec-php-unicode-garbled/#post-1473333)
 * **Fixed!** Awesome! Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Shortcode Exec PHP] Unicode Garbled’ is closed to new replies.

## Tags

 * [unicode](https://wordpress.org/support/topic-tag/unicode/)

 * 2 replies
 * 2 participants
 * Last reply from: [taxihorn](https://wordpress.org/support/users/taxihorn/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/plugin-shortcode-exec-php-unicode-garbled/#post-1473333)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
