Wordpress Character Map and Unicode Encoder
Posted on Friday the 6th of April, 2007 at 8:01 pm in PluginsWordpress Character Map and Unicode Encoder is a simple to use plugin that adds a character map underneath of your edit post box which provides easy access to all unicode entities. It also allows you to convert all special Unicode characters (anything you wouldn’t see on the average American keyboard) to their respective entities and back again. (This feature can also be downloaded as a separate plugin.) The character map supports all Unicode characters (a few sets have been disabled because of their size) and allows you to set your “favorite” characters which will automatically be displayed underneath the edit box.
The most powerful part of this plugin is the Unicode converter. I was able to go back to one of my older posts that had many Japanese and Chinese characters and convert the entire post to valid Unicode in one click. Go view the post and try switching Character encodings in your browser. Nothing changes if you do. ☺☻ before I converted it if it was viewed in anything other than UTF-8 it was all gobbledy-gook.
Download:
Character Map (with Unicode Encoder) Plugin Version 0.1 or you can download the Unicode Encoder as a separate plugin.
Installation:
- Save the plugin with the extension .php
- Upload it to your ‘wp-content/plugins’ directory
- Activate the plugin named “Character Map” or if you downloaded just the Character Encoder activate it.
Character Map Usage:
- The character map appears directly under content box on your new/edit post page.
- On the right side is a list of the character groups (and the options panel) clicking one of these will update the character map shown.
- It is best to save your posts with entities rather than characters because of the way Unicode and character encodings work. For example, let’s say I have the word Areté if I use an entity it will display correctly on all browsers and web servers (unless they are unable to display the character itself); however, if I were to use the actual character ‘é’ and saved it using my websites default character encoding, it would “lock in” the character to that one encoding. If a user from another country, whose browser used a different encoding, visited they would just see some random characters–specifically: é. However, if I had saved the ‘é’ as an entity it would always display the same way.
- Checking the Safe Mode option will make it so you automatically add the entities to the posts rather than characters. You can easily switch the entities to characters by clicking “Char- > Ent” button. When you are done editing you can switch them back by clicking “Ent -> Chars”
- Under the options panel you can add special characters that will always show by default when you load the edit post/page panel. You can add characters to this as either the actual character σ, as Unicode entities σ or as an HTML entity σ, or as just its name (sigma) or number (963). The plugin will automatically convert them to the correct format.
- Sometimes the special characters &, >, and < will not display like entities or characters like the rest of custom charecters in the options panel. You may ignore this because this is done intentionally. No matter the form, the characters will work correctly.
Character Encoder Usage:
- If you use the non-rich text editor you will see two new buttons in your toolbar. These buttons are pretty self explanatory. (”ent” means entity and “char” means character)
- Normal characters (a,%,8,”) will not be converted to entities, and HTML special charecters (>,<,&, >,<,&) will never be converted from one form to another.


Great plugin! I’m downloading this right away. My blog is mostly English, but I often have phrases in other languages in my posts. I’ve a request: what about special characters in comments? How difficult would it be to have a Char→Ent button, say, on the Dashboard, which converts special characters in recent comments to entities?
Reply to JonathanIt isn’t too difficult, but you are far better off using PHP to do that.
You can use the following code snippet as a filter for all comment texts to automatically convert the special characters to entities.
add_filter('pre_comment_content','fix_chars');function fix_chars($content){$encoding = get_option('blog_charset');if(!$encoding){$encoding = "AUTO";}$content=mb_convert_encoding($content,"HTML-ENTITIES",$encoding);return $content;}However, not all PHP installs have access to multiByte functions, so f you can’t do it that way yo can try:
- Use the following to copy and paste the code.
Reply to Aaronadd_filter('pre_comment_content','fix_chars');function fix_chars($content){$encoding = get_option('blog_charset');if(!$encoding){$encoding = "AUTO";}$content=htmlentities($content, ENT_NOQUOTES, $encoding);return $content;}As an non-english blogger who uses many “special” characters, thank you. This will make it much easier for me.
Reply to JoséThanks!
Reply to JeanWhat a great pluggin! The one thing I am not sure of is where to add the code snippet, which file do you add it to and where?
Reply to Kimwhat is a snippit?
Reply to AshleyA “snippet” is a small section of computer code or text.
Reply to Aaronhey, I really don’t get this website, all Im looking for is words you would find on a character map in the start menu on a computer so I can put them on my msn (windows Live Messenger)
Reply to AshleyHi Ashley,
This page is for a program that does something like it, but it only works with WordPress.
Unfortunately, this isn’t what you are looking for, but I’m sure you will be able to find it.
Aaron.
Reply to AaronFor Free Interview Questions and Tutorials Visit http://www.sap4india.com ,www.sapag.co.in
Reply to SAP4INDIA.COMRegrettably, I just had a very unpleasant experience with your Character Map (with Unicode Encoder) Plugin Version 0.1.
I installed Character Map in my plugin directory, as per your instructions. It appeared on my Plugin Management page with an alert stating that a newer version of Character Map was available, called Character Map 1.1. Suspecting nothing, I pushed the button for an automatic upgrade.
A “failed to open stream” error message then appeared at the top of every page of my Web site, indicating that a problem existed on my wp-settings file.
I tried various measures to remove the warning, such as deleting the Character Map plugin; deactivating all other plugins; then deleting and replacing the wp-settings file several times. Nothing worked. The same warning kept reappearing, no matter what I did.
Then I noticed that the second part of the warning mentioned a “Failed opening” of something called moonvipercmscom in my plugins folder. The term “moonvipercmscom” was unfamiliar to me. I had never installed any such plugin, and my Plugin Management page did not indicate its presence. However, upon checking my plugins folder directly through my FTP client, I saw that there was indeed a mysterious folder called moonvipercmscom sitting there.
Deleting moonvipercmscom seemed to solve the problem. The warning messages disappeared. However, now I am wondering if any other malware invaded my server or computer during the Character Map installation. I guess I’d better run some diagnostics.
Needless to say, I will not attempt to install Character Map again. This is a pity, as it appears to be an extremely useful plugin.
Has anyone else reported similar problems?
P.S. My blog is running on WordPress 2.6.3, and currently uses the Cutline 1.1 theme.
Reply to PoePoe » This plugin has not been tested or updated in many versions, so it may not work correctly.
However, this plugin does not have any malware installed with it nor does it make it easy for malware to end up on your server.
If anything, it highlighted a problem that already existed, so I would suggest talking to your server host to find where the error came from.
Reply to AaronDear Aaron:
Thank you for your reply.
I tried installing your Character Map plugin again. This time I succeeded, and the plugin worked.
However, I still got the same mysterious message upon installing your plugin. The message says:
“There is a new version of Character Map available. Download version 1.1 here or upgrade automatically.”
This time around, I did not try to upgrade to “version 1.1″. I simply ignored the message and used Character Map version 0.1 exactly as I downloaded it from your site. When I did that, everything worked fine.
Still, the mystery remains. Why is my Plugin Management page inviting me to download Character Map “version 1.1″, when no such version exists?
And why, when I made the mistake, last time, of trying to download “version 1.1″, did I end up with a nasty program called moonvipercmscom in my plugin folder?
Strange.
Reply to PoeHi,
a question: it works with Wordpress 2.7?
Thank you!
Reply to SergejpinkaGreat Article. Thanks. I agree
Reply to ttn mobilei’m just wondering if ‘♥’ will show up on the post with this plugin?
Reply to lynn