on the Curl Web Content Markup Language

on the Curl Web Content Markup and Programming Language from www.curl.com and www.curlap.com

Monday, September 8, 2014

Curl char type and the CharGraphic class


Over at kanji.aule-browser.com I have a Curl applet embedded in HTML as part of my efforts to learn to read and write Japanese kanji.

What is interesting is this : try to select the top 6 or 7 rows in the left-hand widget ; now try to paste them into the HTML TextArea below or the Curl RichTextEdit to the right.

See something odd?  Two of the kanji are not copied.  Try again and observe the selection range.  Two kanji do not hi-light.

Expression-based Curl is homoiconic, so here is the declarative code/data implicated :

{krow "0014","0000",'〇'}
{krow "0002","2850",'一'}
{krow "0003","1688",'ニ'}
{krow "0437","2851",{on-yomi-only {CharGraphic '丁'}}}
{krow "0009","2854",{CharGraphic '七'}}
{krow "0018","2542",{on-yomi-only 万}}
{krow "0657","2885",'丈'}
{krow "0004","1689",'三'}
{krow "0041","2876",'上'}
{krow "0040","2862",'下'}
{krow "0049","2890",{on-yomi-only 不}}
{krow "0858","2887",'与'}
|| first 12 rows of 'data'

The single-quoted kanji are of type char. At random I have replaced them with CharGraphic instances in either the minimal expression or within the {on-yomi-only } macro that paints some characters RED.




No comments:

Post a Comment