From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Beck Newsgroups: gmane.emacs.help Subject: Re: Browsing Unicode Symbols Date: Wed, 09 Jul 2008 16:32:34 +0200 Organization: T-Online Message-ID: <87abgr5drx.fsf@sophokles.streitblatt.de> References: <1a37f6d3-1121-45bf-808a-38590605c4cb@f36g2000hsa.googlegroups.com> <87iqvg56qx.fsf@sophokles.streitblatt.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1215614494 6000 80.91.229.12 (9 Jul 2008 14:41:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Jul 2008 14:41:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 09 16:42:21 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KGas7-0004h0-4Z for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Jul 2008 16:42:19 +0200 Original-Received: from localhost ([127.0.0.1]:41574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGarF-0007OS-Po for geh-help-gnu-emacs@m.gmane.org; Wed, 09 Jul 2008 10:41:25 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!fu-berlin.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 230 Original-X-Trace: news.t-online.com 1215613954 02 31257 ys8qOCFJLvxoOTO 080709 14:32:34 Original-X-Complaints-To: usenet-abuse@t-online.de X-ID: VyVdk6ZfoeEX7ZWCU8fBWiBWi69l2hsIDsCew0Iv5cZbzwXbJ17YQF User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:IM7RPHqgQ1qD1xgu8nfGEg22Crw= Original-Xref: news.stanford.edu gnu.emacs.help:159992 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55342 Archived-At: Peter Dyballa writes: >> To see how a specific font renders all characters, dolist the >> characters >> defined in the the unicode standard (/admin/unidata/UnicodeData.txt in >> the emacs sources). > > How do *you* see these? The file is just a description of Unicode > characters in US-ASCII Well, yes, but you can use it to get the data you need. I do it with this function: (defun test-unicode (&optional font) (interactive) (let (unidata) (with-temp-buffer (insert-file-contents "/home/fb/src/emacs/admin/unidata/UnicodeData.txt") (goto-char (point-min)) (while (re-search-forward "^\\([[:alnum:]]+\\);\\(.*?\\);" nil t) (let* ((code (string-to-number (match-string 1) 16)) (char (char-to-string code))) ;; Symbols the specified font cannot handle may still be ;; displayed in another font. (if font (setq char (propertize char 'face `(:family ,(format "%s" font))))) (add-to-list 'unidata (cons code (concat (format "%6x" code) "\t" char "\t" (downcase (match-string 2)))))))) (setq unidata (reverse unidata)) (switch-to-buffer "*Unicode Test*") (erase-buffer) (let (done-blocks) (dolist (entry unidata) ;; group by range (let ((ublock (unicode-block (car entry)))) (unless (member ublock done-blocks) (add-to-list 'done-blocks ublock) (insert "\n\n" ublock "\n"))) (insert (cdr entry) "\n"))))) Either comment out the let block that groups by range or use the following (I have not looked into how describe-char handles this): (defun unicode-block (char) (let ((list unicode-blocks) block-name) (dolist (i list) (if (and (>= char (car i)) (<= char (cadr i))) (setq block-name (nth 2 i)))) block-name)) (defvar unicode-blocks '((?\x0000 ?\x007F "Basic Latin") (?\x0080 ?\x00FF "Latin-1 Supplement") (?\x0100 ?\x017F "Latin Extended-A") (?\x0180 ?\x024F "Latin Extended-B") (?\x0250 ?\x02AF "IPA Extensions") (?\x02B0 ?\x02FF "Spacing Modifier Letters") (?\x0300 ?\x036F "Combining Diacritical Marks") (?\x0370 ?\x03FF "Greek and Coptic") (?\x0400 ?\x04FF "Cyrillic") (?\x0500 ?\x052F "Cyrillic Supplement") (?\x0530 ?\x058F "Armenian") (?\x0590 ?\x05FF "Hebrew") (?\x0600 ?\x06FF "Arabic") (?\x0700 ?\x074F "Syriac") (?\x0750 ?\x077F "Arabic Supplement") (?\x0780 ?\x07BF "Thaana") (?\x07C0 ?\x07FF "NKo") (?\x0900 ?\x097F "Devanagari") (?\x0980 ?\x09FF "Bengali") (?\x0A00 ?\x0A7F "Gurmukhi") (?\x0A80 ?\x0AFF "Gujarati") (?\x0B00 ?\x0B7F "Oriya") (?\x0B80 ?\x0BFF "Tamil") (?\x0C00 ?\x0C7F "Telugu") (?\x0C80 ?\x0CFF "Kannada") (?\x0D00 ?\x0D7F "Malayalam") (?\x0D80 ?\x0DFF "Sinhala") (?\x0E00 ?\x0E7F "Thai") (?\x0E80 ?\x0EFF "Lao") (?\x0F00 ?\x0FFF "Tibetan") (?\x1000 ?\x109F "Myanmar") (?\x10A0 ?\x10FF "Georgian") (?\x1100 ?\x11FF "Hangul Jamo") (?\x1200 ?\x137F "Ethiopic") (?\x1380 ?\x139F "Ethiopic Supplement") (?\x13A0 ?\x13FF "Cherokee") (?\x1400 ?\x167F "Unified Canadian Aboriginal Syllabics") (?\x1680 ?\x169F "Ogham") (?\x16A0 ?\x16FF "Runic") (?\x1700 ?\x171F "Tagalog") (?\x1720 ?\x173F "Hanunoo") (?\x1740 ?\x175F "Buhid") (?\x1760 ?\x177F "Tagbanwa") (?\x1780 ?\x17FF "Khmer") (?\x1800 ?\x18AF "Mongolian") (?\x1900 ?\x194F "Limbu") (?\x1950 ?\x197F "Tai Le") (?\x1980 ?\x19DF "New Tai Lue") (?\x19E0 ?\x19FF "Khmer Symbols") (?\x1A00 ?\x1A1F "Buginese") (?\x1B00 ?\x1B7F "Balinese") (?\x1B80 ?\x1BBF "Sundanese") (?\x1C00 ?\x1C4F "Lepcha") (?\x1C50 ?\x1C7F "Ol Chiki") (?\x1D00 ?\x1D7F "Phonetic Extensions") (?\x1D80 ?\x1DBF "Phonetic Extensions Supplement") (?\x1DC0 ?\x1DFF "Combining Diacritical Marks Supplement") (?\x1E00 ?\x1EFF "Latin Extended Additional") (?\x1F00 ?\x1FFF "Greek Extended") (?\x2000 ?\x206F "General Punctuation") (?\x2070 ?\x209F "Superscripts and Subscripts") (?\x20A0 ?\x20CF "Currency Symbols") (?\x20D0 ?\x20FF "Combining Diacritical Marks for Symbols") (?\x2100 ?\x214F "Letterlike Symbols") (?\x2150 ?\x218F "Number Forms") (?\x2190 ?\x21FF "Arrows") (?\x2200 ?\x22FF "Mathematical Operators") (?\x2300 ?\x23FF "Miscellaneous Technical") (?\x2400 ?\x243F "Control Pictures") (?\x2440 ?\x245F "Optical Character Recognition") (?\x2460 ?\x24FF "Enclosed Alphanumerics") (?\x2500 ?\x257F "Box Drawing") (?\x2580 ?\x259F "Block Elements") (?\x25A0 ?\x25FF "Geometric Shapes") (?\x2600 ?\x26FF "Miscellaneous Symbols") (?\x2700 ?\x27BF "Dingbats") (?\x27C0 ?\x27EF "Miscellaneous Mathematical Symbols-A") (?\x27F0 ?\x27FF "Supplemental Arrows-A") (?\x2800 ?\x28FF "Braille Patterns") (?\x2900 ?\x297F "Supplemental Arrows-B") (?\x2980 ?\x29FF "Miscellaneous Mathematical Symbols-B") (?\x2A00 ?\x2AFF "Supplemental Mathematical Operators") (?\x2B00 ?\x2BFF "Miscellaneous Symbols and Arrows") (?\x2C00 ?\x2C5F "Glagolitic") (?\x2C60 ?\x2C7F "Latin Extended-C") (?\x2C80 ?\x2CFF "Coptic") (?\x2D00 ?\x2D2F "Georgian Supplement") (?\x2D30 ?\x2D7F "Tifinagh") (?\x2D80 ?\x2DDF "Ethiopic Extended") (?\x2DE0 ?\x2DFF "Cyrillic Extended-A") (?\x2E00 ?\x2E7F "Supplemental Punctuation") (?\x2E80 ?\x2EFF "CJK Radicals Supplement") (?\x2F00 ?\x2FDF "Kangxi Radicals") (?\x2FF0 ?\x2FFF "Ideographic Description Characters") (?\x3000 ?\x303F "CJK Symbols and Punctuation") (?\x3040 ?\x309F "Hiragana") (?\x30A0 ?\x30FF "Katakana") (?\x3100 ?\x312F "Bopomofo") (?\x3130 ?\x318F "Hangul Compatibility Jamo") (?\x3190 ?\x319F "Kanbun") (?\x31A0 ?\x31BF "Bopomofo Extended") (?\x31C0 ?\x31EF "CJK Strokes") (?\x31F0 ?\x31FF "Katakana Phonetic Extensions") (?\x3200 ?\x32FF "Enclosed CJK Letters and Months") (?\x3300 ?\x33FF "CJK Compatibility") (?\x3400 ?\x4DBF "CJK Unified Ideographs Extension A") (?\x4DC0 ?\x4DFF "Yijing Hexagram Symbols") (?\x4E00 ?\x9FFF "CJK Unified Ideographs") (?\xA000 ?\xA48F "Yi Syllables") (?\xA490 ?\xA4CF "Yi Radicals") (?\xA500 ?\xA63F "Vai") (?\xA640 ?\xA69F "Cyrillic Extended-B") (?\xA700 ?\xA71F "Modifier Tone Letters") (?\xA720 ?\xA7FF "Latin Extended-D") (?\xA800 ?\xA82F "Syloti Nagri") (?\xA840 ?\xA87F "Phags-pa") (?\xA880 ?\xA8DF "Saurashtra") (?\xA900 ?\xA92F "Kayah Li") (?\xA930 ?\xA95F "Rejang") (?\xAA00 ?\xAA5F "Cham") (?\xAC00 ?\xD7AF "Hangul Syllables") (?\xD800 ?\xDB7F "High Surrogates") (?\xDB80 ?\xDBFF "High Private Use Surrogates") (?\xDC00 ?\xDFFF "Low Surrogates") (?\xE000 ?\xF8FF "Private Use Area") (?\xF900 ?\xFAFF "CJK Compatibility Ideographs") (?\xFB00 ?\xFB4F "Alphabetic Presentation Forms") (?\xFB50 ?\xFDFF "Arabic Presentation Forms-A") (?\xFE00 ?\xFE0F "Variation Selectors") (?\xFE10 ?\xFE1F "Vertical Forms") (?\xFE20 ?\xFE2F "Combining Half Marks") (?\xFE30 ?\xFE4F "CJK Compatibility Forms") (?\xFE50 ?\xFE6F "Small Form Variants") (?\xFE70 ?\xFEFF "Arabic Presentation Forms-B") (?\xFF00 ?\xFFEF "Halfwidth and Fullwidth Forms") (?\xFFF0 ?\xFFFF "Specials") (?\x10000 ?\x1007F "Linear B Syllabary") (?\x10080 ?\x100FF "Linear B Ideograms") (?\x10100 ?\x1013F "Aegean Numbers") (?\x10140 ?\x1018F "Ancient Greek Numbers") (?\x10190 ?\x101CF "Ancient Symbols") (?\x101D0 ?\x101FF "Phaistos Disc") (?\x10280 ?\x1029F "Lycian") (?\x102A0 ?\x102DF "Carian") (?\x10300 ?\x1032F "Old Italic") (?\x10330 ?\x1034F "Gothic") (?\x10380 ?\x1039F "Ugaritic") (?\x103A0 ?\x103DF "Old Persian") (?\x10400 ?\x1044F "Deseret") (?\x10450 ?\x1047F "Shavian") (?\x10480 ?\x104AF "Osmanya") (?\x10800 ?\x1083F "Cypriot Syllabary") (?\x10900 ?\x1091F "Phoenician") (?\x10920 ?\x1093F "Lydian") (?\x10A00 ?\x10A5F "Kharoshthi") (?\x12000 ?\x123FF "Cuneiform") (?\x12400 ?\x1247F "Cuneiform Numbers and Punctuation") (?\x1D000 ?\x1D0FF "Byzantine Musical Symbols") (?\x1D100 ?\x1D1FF "Musical Symbols") (?\x1D200 ?\x1D24F "Ancient Greek Musical Notation") (?\x1D300 ?\x1D35F "Tai Xuan Jing Symbols") (?\x1D360 ?\x1D37F "Counting Rod Numerals") (?\x1D400 ?\x1D7FF "Mathematical Alphanumeric Symbols") (?\x1F000 ?\x1F02F "Mahjong Tiles") (?\x1F030 ?\x1F09F "Domino Tiles") (?\x20000 ?\x2A6DF "CJK Unified Ideographs Extension B") (?\x2F800 ?\x2FA1F "CJK Compatibility Ideographs Supplement") (?\xE0000 ?\xE007F "Tags") (?\xE0100 ?\xE01EF "Variation Selectors Supplement") (?\xF0000 ?\xFFFFF "Supplementary Private Use Area-A") (?\x100000 ?\x10FFFF "Supplementary Private Use Area-B"))) -- Florian Beck