Posts

Emoji by Name

Image
Here is a method for typing Emoji by name but not by English name. This method is for writing Emoji by Chinese name. OSX provides a Pinyin Input Method for writing Chinese. Pinyin is a romanization of Chinese. When writing in pinyin a candidate window pops up which lists all possible Chinese characters 汉字 and Emoji. Candidate Window - Frequency Candidate Window — Emoji Here is a small sample of the Emoji which can be typed using this Pinyin Input Method. Each line below starts with the pinyin followed by the Emoji. The pinyin can have multiple meanings, multiple candidate Chinese characters and hence multiple Emoji. Hopefully for the examples I have given below you will be able to work out the meanings from the Emoji. Some of the below pinyin represent objects and some represent emotions. ai — ❤️ 😘 💗 💓 😍 bei shang — 😢 😭 che — 🚗 🚘 hou — 🐒 🐵 hua — 🌹 &#x1...

Unicode Regular Expressions

I have long been familiar with processing Unicode characters with RegExp (Regular Expressions). I was also aware that RegExp could be used to match Unicode characters based upon their Unicode assigned character properties. I had not yet though coded such property based RegExp. A few days ago I decided to explore this area. An interesting property, for example, is the script to which a character belongs. e.g. \p{Hangul} will match with any character which belongs to the Hangul script. Hangul is the script used to write Korean. I started with Perl and here is my simple Perl program: #!/usr/bin/perl if("노팅엄"=~/^\p{Hangul}+$/){print "korean\n";}else{print "not korean\n";} ...and this code did not work. I know that  노팅엄  is Korean hangul but my code disagreed. After much searching I discovered I needed to include the statement use utf8 which instructs Perl to use Unicode UTF8 encoding. So my working version of the code is: #!/usr/bin/perl use utf8; if("노...

Nottingham on Weibo

Sina Weibo 新浪微博 is a China microblogging service en.wikipedia.org/wiki/Sina_Weibo . Nottingham now has a number organisations on Sina Weibo. Here are some of them. Nottingham City Council [@英国诺丁汉市政厅] weibo.com/nottinghamcity Nottingham Trent University [@英国诺丁汉特伦特大学] weibo.com/ntuinternational Nottingham University Business School [@英国诺丁汉大学商学院] weibo.com/UoNBusiness University of Nottingham [@英国诺丁汉大学官方微博] weibo.com/uoneao Note: I only list Nottingham Weibo accounts that are verified and have a meaningful URL ie not the default numeric form.

JavaScript Variable Names

In  schappo.blogspot.co.uk/2015/06/php-variable-names.html  I explained how PHP variable names are determined at the byte level. JavaScript variable names are determined at a higher level and are defined in terms of Unicode Properties and General Categories. Letʼs start with some simple Basic Latin variable name examples. Valid Names:  nottingham  nottingham8 Invalid Name:  8nottingham where 8 is Unicode character U+0038 DIGIT 8. The last name, above, being invalid because it begins with a digit. We are in the Unicode age and so do not need to restrict ourselves to Basic Latin. Some time ago I asked myself whether the same Basic Latin rule, an initial digit is invalid , applies to other Scripts and yes it does (well mostly). Valid Devanagari Names:  नाटिंघम  नाटिंघम६ Invalid Devanagari Name:  ६नाटिंघम where ६ is Unicode character U+096C DEVANAGARI DIGIT SIX Valid Thai Names:  นอตทิงแฮม  นอตทิงแฮม๘ Invalid Thai Name:  ๘นอตทิงแฮม...

Multilingual PDF

There is an OS X extension lpdf , which is the Multilingual PDF of the title of this blog article. Letʼs look at System Information.app with terminal. find . -name '*.lpdf' ./Contents/Resources/ProductGuides/productinfo1.lpdf ./Contents/Resources/ProductGuides/productinfo2.lpdf ./Contents/Resources/ProductGuides/productinfo3.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00023.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00272.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00432.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00458.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00459.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00465.lpdf ./Contents/Resources/ProductGuides/regulatory-022-00466.lpdf ./Contents/Resources/ProductGuides/regulatory-022-5167.lpdf ./Contents/Resources/ProductGuides/regulatory-022-6097.lpdf ./Contents/Resources/ProductGuides/regulatory-022-6098.lpdf ./Contents/Resources/ProductGuides/regulatory-022-6...

PHP Variable Names

For years I thought PHP variable names could only be constructed from ASCII characters. Actually, maybe I had not really thought about it but rather just followed common practice without question. The common practice being something like a variable name is prefixed with $ the first character must be a letter (a-z, A-Z) or an underscore (_) subsequent characters can be any mix of letters or digits (0-9) or underscore So, examples of valid PHP variable names include $Andre   $age   $previous_total But!!!!! We are in the Unicode age and so variable names are NOT restricted to the above common practice. We can be much more creative. We can, for instance, localise our code. Examples of valid variable names include $André   $小山   $エクセレント   $우수한   $🐉 For the following explanation I am assuming your source code file is saved as Unicode UTF-8. If not, it should be. Letʼs refer to the the definitive ...

Chinese Name

Image
My chinese adopted name is 小山 which consists of two chinese characters. Sometime ago I was informed that there is a single chinese character that combines 小 and 山. The ideographic description character sequence is ⿱小山 This combined character is encoded in Unicode in SIP (Supplementary Ideographic Plane), CJK Unified Ideographs Extension C at codepoint U+2AA24. The only font I have, so far, found which contains a glyph for this character is hanazono which is available for download from  osdn.jp/projects/hanazono-font/releases/62072  Hanazono is actually provided as two ttf font files:  HanaMinA and HanaMinB. Here is what the combined character, which is in HanaMinB, looks like in TextEdit on OSX. Is there a sound for this uncommon character? After much searching I discovered  cns11643.gov.tw/MAIDB/query_general_view.do?page=c&code=263f  which represents the sound as shān (Hanyu Pinyin) and ㄕㄢ (Zhuyin). Same sound for both forms of representation. CNS 116...