Web Dev Matters and Me

Web Development Matters - HTML, XML, C#, .NET, AJAX/Javascript(jQuery), CSS, XML-XSLT

ME - LIFE,Philippines, Tokyo, ECE, PhilNITS/JITSE,情報処理, 日本語

things about Philippines, gaming, C# development and web development, how to make money in stock trading

Web Dev Matters and Me

Targeting appropriate encoding

Writing web applications/website is easy and I can understand why other people can commit to do it in 10 straight days, but that is because they only focus on one language application/site. Eventually you will deal with a multilingual requirement that requires you to check against encoding.

Sometimes, just specifying the code below will not save you
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=(yourtarget encoding)">


so, here are the things you must consider, especially for dynamic pages.


1. Check or specify an encoding for your output.
on asp, you can specify codepage = number, example 932 for SHIFT-JIS

2. If not dynamic page, try to save the file in that encoding.

you can edit the page, re-save it, and use the "UTF-8" encoding.



3. specify the html attribute lang.
it will not help much in formatting, but at least help search engine bots to find and
determine the content of your site/application.

4. Check the font.

There are also times that, it is the font family that you're using that prevents the text to be rendered properly. For example,

日本 will be displayed as 日口 when using Copperlate Gothic Light.


5. Encode URL if you're using it as a link.

Since it will be used as a link, it will be passed in URL, and since the URL cannot accept non-ascii characters, there are possibilities of error. There won't be any problems in the SEO since, google can detect and convert them as the original text.
Url encoding will guarantee that a string will be passed correctly.

0 comments:

FB Connect