Foreign Characters In Squidoo With Unicode

1 - I can do better 2 - Jury's out 3 - Pretty darn good 4 - Splendiferous 5 - Awesometastic by 13 people | Log in to rate

Ranked #434 in Squidoo Tips, #73,656 overall

The Easy Method: Use HTML Numerical Character References (NCRs)

The quick and dirty details.

The following are two simple methods to get foreign characters to appear in your Squidoo lenses.

Step 1. Enter your text in a word processor.

Step 2. Copy and paste your text into the form at pinyin.info to convert it to html numerical character references (NCRs). The website says it's for chinese, but ignore that, it will work for many different languages.

Step 3. Copy and paste the resulting html NCRs into your squidoo module.

The html NCRs are a bunch of "&" ampersands and numbers that look something like this: 鱿鱼 See the wikipedia articles on Numeric Character References and Unicode for more info.

Image

There's also a nice converter by Richard Ishida that will also convert NCRs back to text. Richard is the Internationalization Activity Lead at the W3C (World Wide Web Consortium), aka uber geek.

pinyin.info - Simple form to convert foreign characters to html compatible unicode NCRs.
rishida.net - Converts the other way, from unicode to regular text too.
Numeric Character References - Wikipedia article.
Unicode - Wikipedia article

The Most Reliable Method: Use Gif or Jpeg Image Files 

Boy Writing Chinese Calligraphy, Shanghai, China
Boy Writing Chinese Calligraphy
Buy at AllPosters.com

Step 1. Enter your text in a word processor.

Step 2. Do a screen capture of the characters you want to include in your lens.

Step 3. Use an html <img> tag to include the image file in your lens.

Example html: <img src="http://yourimageserver.com/Image/ChineseSquidChars.gif" />

See the following lenses for more info on using html <img> tags.



HTML for Photos: A Tutorial for the Semi-Clueless - Adding images to lenses using html.
Basic HTML for Squidoo - Another good lens on adding images with html.

Examples Of What The Viewer Sees 

Intention
Intention Art Print
Buy at AllPosters.com

Say you wanted to display the chinese characters for "squid" as an example. In order for the html NCRs to display properly, the person viewing the lens, must have a font installed that supports chinese characters. Not everyone will have the necessary fonts, but users that would be likely to read a webpage in chinese would most likely have a chinese font installed.

Here's an example of what they might see.

鱿鱼 - Displayed using html unicode NCRs

- Displayed with html <img> tags.

- what the viewer will probably see without correct fonts installed.


So depending on how much text containing foreign characters you want to display, using jpg image files might be preferable. It will display the characters even if the user doesn't have the correct fonts installed.

Doing a Screen Capture 

Foreign Legion Adventures
Foreign Legion Adventures
Buy at AllPosters.com

Do a screen capture by pressing the PrintScreen key near the top right of the keyboard. For Windows users, this will copy the contents of the screen to the clipboard. You can then paste the resulting screen capture into Photoshop, The Gimp, or any graphics editing software. For linux users, pressing the PrintScreen key brings up a dialogue box that allows you to save the contents of the screen to a file on disk.

Once you have the screen capture loaded into your image editing software, crop the image down to show only the characters you want to display.

Why Do I Have To Use Unicode? 

Because sometimes, different computers, or even different software applications on the same computer, use different codes or numbers to represent the same character.

Computers don't store letters! Computers can only store ones and zeros. It just looks like they store letters and words because we tell the computers how to convert the ones and zeros, into letters. In fact there's something called the ASCII table that is a standard method used by computers for just that purpose. For instance, computers that use the ASCII table, will store the letter "A" as the number 65, the letter "B" as 66, and so on.

The problem is that the ASCII table only tells a computer how to convert the english alphabet to numbers, plus a few other characters. It just doesn't have enough space in the table to represent all the characters from all the different languages in the world. So computer companies ended up creating a bunch of new tables that tell a computer how to store characters, and nobody really agreed on how to do it.

Kerala, India
Kerala, India Art Print
Buy at AllPosters.com

Internationalization According To The Unicode Consortium 

Love
Love Art Print
Buy at AllPosters.com

So this is where The Unicode Consortium enters the picture. They are a collaborative group of major computer corporations, software producers, database vendors, government ministries, research institutions, international agencies, and well, lots of smart geeky type people.

The Unicode Consortium created the Unicode Standard, which they describe as:

Unicode provides a unique number for every character, no matter what the platform, no matter what the program, no matter what the language.

Unicode supports Cherokee indian and Cuneiform too!

And they mean business too! Unicode includes characters from Runic, Ethiopic, Cherokee indian, Hanunoo, and Glagolitic scripts.

Unicode Charts - List of all the different scripts (languages) included in Unicode, and charts of all the individual characters.

Questions and Comments Please 

submit

Unicode Books 

Unicode Standard, Version 5.0, The (5th Edition)

Amazon Price: $54.59 (as of 12/04/2009) Buy Now

Unicode Demystified: A Practical Programmer's Guide to the Encoding Standard

Amazon Price: $44.40 (as of 12/04/2009) Buy Now

Unicode

Amazon Price: $52.20 (as of 12/04/2009) Buy Now

Unicode Explained

Amazon Price: $50.59 (as of 12/04/2009) Buy Now

Mapping of Unicode characters

Amazon Price: $33.87 (as of 12/04/2009) Buy Now

by MagicBeanDip

wordpress stats MagicBeanDip: 25 Things
Famous Love Quotes.
I live with my wife Mona on a farm in rural Iowa, where we have a small custom frame shop and gallery that... (more)
Create a Lens!