การสั่งแสดงตัวอักษร ก ใน CP874 บน Webpage

มีโอกาสนั่งคุยกับนักศึกษา
เรื่องตัวเลข ฐานสิบ ฐานสิบหก และตาราง ASCII
พบตาราง Character Set ของคนไทย คือ Windows-874 หรือ TIS-620
หากจะแสดงเว็บเพจภาษาไทย
มักใช้ <meta http-equiv=”content-type” content=”text/html;charset=windows-874″ />
หรือ <meta charset=”tis-620″ />
แล้วสั่งแสดงตัวอักษร ก ด้วย &#3585; หรือพิมพ์ตรง ๆ ก็ได้
หากใช้ตัวเลข ก็แสดงว่า 3585 คือ ก
ซึ่งเป็นเลขสำหรับตัวอักษรภาษาไทยตัวแรก ในระบบ Unicode
แล้วพบว่าไม่สามารถแสดงด้วย &#161; หรือ &#xA1;
เพราะ Browser ไม่ได้รองรับ
อักษรพิเศษอื่น ๆ ที่ชวนมอง และมี Entity Name

อาทิ
&amp; = Ampersand
# = Number sign
# = Hashtag sign
# = Sharp sign

 

โฮมเพจที่น่าสนใจ
http://www.w3schools.com/charsets/ref_utf_symbols.asp
http://www.rakjung.com/facebook-no163.html
http://www.thailibrary.in.th/2014/02/13/char-set/
https://en.wikipedia.org/wiki/Code_page

Author: บุรินทร์ รุจจนพันธุ์

I am Lecturer, Developer, Researcher, Columnist, Writer, Photographer, and Webmaster - L@mpang man

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.