Over at aule-browser I have added an HTML page which correctly displays the 13,108 characters in the Kanjidic2 according to the UCS codepoint found in each XML 'character' element.
The XML was parsed using an XPath expression with the Curl XML Document Model library.
日本におけるカール社のウェブサイト
Showing posts with label UNICODE. Show all posts
Showing posts with label UNICODE. Show all posts
Thursday, April 19, 2012
Kanjidic2 codepoint
Labels:
Curl programming language,
Curl RTE,
HTML,
Kanji,
kanjidic2,
learn Japanese,
learn Kanji,
parse,
UCS,
UNICODE,
XML,
XPath
0
comments
at
12:45 PM
Wednesday, April 18, 2012
Kanjidic2 UTF-8 character literal
Today I found that not all characters in the kanjidic2 XML file could be parsed and displayed as UTF-8 – at least not in the fonts available to me in IE.
I have posted a utf-8 web page with those that would display after parsing with Curl's xml path library for the content of the "literal" element for each character element.
Parsing gave a total of 13,108 elements when I was expecting fewer than 7000. Issues only arose with the last thousand or so elements - and a few in that tail-end did display. Problems start after the first 12,166 elements.
In the last thousand elements, only the following few literal values would display:
匇 匤 咊 增 寬 嵓 德 晥 栁 橫 瀨 炻 甁 皞 礰 竧 綠 緖 荢 薰 譿 賴 郞 鄕 霻 靍 馞 魲 黑 朗 隆 﨏 塚 﨑 﨓 凞 猪 神 祥 福 﨟 蘒 﨡 諸 﨤 都
If you have been parsing the kanjidic XML dictionary and have an idea, please drop a line.
UPDATE
Using a tail view of kanjidic2.xml I can see that the last UCS codepoint is FA6A which displays correctly in my browser as 頻.
I will revise my parse path to pull the codepoint instead of the literal.
Wednesday, April 11, 2012
Bloated Desktop Applications
While reviewing my options for caching some graphic containers in Curl, I checked my process explorer.
My browser was creeping up to 1.8 GB as a busy, greedy process on an XP Pentium with 1 GB RAM.
The browser is not the only offender: otherwise useful Evernote appears to lack some smarts (remember when Prolog simply required too much memory?)
Let the OS worry about it? Throw more memory in the device? Ascend to the free cloud?
Is there now a generation of Perl/PHP scriptors working in HTML + JavaScript for whom memory and CPU cycles swapping-to-disk are free? Are they avoiding multiple trips this way? Is this the AJAX heritage? SSD merely warm, but not whirring?
Just as it appears that Rebol may disappear.
Remember why Smalltalk was not in use (outside Amex and JP Morgan and ?) St required a VM and too much memory. Now as some Smalltalk implementations shrink and their VM's enter a new generation, ask a corporate programmer when she last prototyped an app in a Smalltalk dialect.
I can hear it ringing in my ears: "All we need is one little Perl script to do that !" But CGI with Perl was too costly on servers, remember? But now it appears that nothing is too costly on a client device.
But free memory, like free DASD, is only as believable as free money, or 33% annual return on your investment if you get in early.
Where is the desktop UNICODE-savvy text editor app that knows how to edit multiple small files without burping up a 30MB or more process for each tiny text file?
These apps are the bungalows of the sprawling suburbs of 50's Middle-America - and now they propose to bloat invisibly within the cloud. Is this a viable global picture of net resource consumption? Which economic model suggests greater bandwidth as evolution's competitive winning variant?
Maybe kids running Rebol on Raspberry Pi knock-off's will get us on another track.
Try this: compare some smart e-commerce sites to the UI's of Google PLAY or Canada'a zip.ca
Those UI's are not JavaScript generated by Smalltalk - or by Prolog. These sad web pages must each re-evolve from dumb and primitive. These are not smart lean app's standing on the shoulders of bulky slow app's. That is just not how the web is evolving.
PS
Ruby is just a dumbed-down Smalltalk for Perl scripting.
Scala ? Let me tell you a story that is not up-Lift'ing ...
Multi-core? Watch for MC Smalltalk. But bloat and greedy prcesses remain what they are just as a Ponzi-scheme by any name remains your personal goldmine .... and your cousin's, too !
Friday, March 23, 2012
Kanji stroke-order
I have just added a kanji stroke-order page (your browser must allow a page to be viewed with UNICODE character-encoding.)
The page is an alternate version of winttk.com's own page, as I found their page difficult to read (CTRL-+ also effects the Perapera Firefox tool.)
This alternate view was constructed by first making my own indexed text list so as not to copy from their web page, and then using using regexp to construct the links. A white-on-black stylesheet was then added and the font-size corrected so as to be suited to using Perapera's Kanji dictionary tool in Firefox. But shifting this alternate page to point at, say, the Japanese wiktionary.org stroke-order diagrams might be done so simply using Rebel or ICON.
What would have been so much smarter at winttk.com would have been the use of a smart page server such as can be built with Smalltalk Seaside.
But for the user, a page can be made much smarter with a browser tool.
Yes, Greasemonkey-style JavaScript would be one option, but with all of the security worries.
Consider that my simple page only "remembers" which Kanji stroke-order diagrams you have viewed. Using Curl and CSPD (client-side persistent data) a task-specific browser can be easily constructed to track which Kanji continue to give you trouble with their stroke order, e.g., Kanji such as 海 or 家.
The GIF's at winttk.com are attributed as Copyright Alpha Inc. Please respect their copyright as these are only available for web view. I believe they are located in Kanagawa prefecture.
Their page on Alpha Inc. states (in an approximate translation) that "Alpha.Inc material is free for personal use, free of charge, if you are not engaged in education as a commercial business."
I have added an alternate page numbered in accordance with the 1988 (1998) Henshall, "A Guide to Remembering the Kanji". The pages are white-on-black as per my iTouch preference. Would Alpha Inc. be interested in an alternate set of GIF's flipped to white-on-black?
Friday, April 16, 2010
Joel on Software and UNICODE and HTML charset
I wanted to post an note on the joelonsoftware.com page on UNICODE basics.
That page has a link to i18nguy.com which has useful pages linked.
My own habit is to use a variety of pages at fileformat.info such as the P-page and the S-page when I want a Pilcrow sign ( ¶ ) or the planet Saturn symbol or some such.
Some of my favourites are balanced quotation marks ( “ ” ) and a variety of foreign quotation marks ( »« ).
The reason for the quotation marks is so that when doing poetry markup in Curl I will not have to "escape" the keyboard dbl-quote character ( " ) which is used by the progamming language but which I don't want to use in text markup.
I seem to use the paired single-quotes ( ‘ ’ ) less often.
Here are German-style quotes: „Sein“ (will be better in a suitable font.)
Other favourites of mine are § Ç ß ä ö ü à é and ê ë è ï î ö ô along with Ä Ö Ü. The last characters should have been capital A O U with umlaut diacritics: if you see something else, you may have to change a browser VIEW setting for Encoding for your web browser.
If you are a Windows user who wants to copy and save these to a notepad cheatsheet, remember to save the file as UTF-8 on the SAVE AS menu. When you need an é in a hurry, holding down the ALT-key and typing 1 3 0 on the keypad and then releasing the ALT-key will place U-00E9 into most text.
IF you are a Windows user with an editor that which will not use displauy UNICODE with the default Arial Unicode MS font, well, there is always Notepad++ ... and it will allow you to save the file with or without the initial BOM bytes that indicate the encoding (which default notepad will not suppress.)
The minimal HTML header follows:
Note: the above links have been set to open in a tab or window other than this blog page.
That page has a link to i18nguy.com which has useful pages linked.
My own habit is to use a variety of pages at fileformat.info such as the P-page and the S-page when I want a Pilcrow sign ( ¶ ) or the planet Saturn symbol or some such.
Some of my favourites are balanced quotation marks ( “ ” ) and a variety of foreign quotation marks ( »« ).
The reason for the quotation marks is so that when doing poetry markup in Curl I will not have to "escape" the keyboard dbl-quote character ( " ) which is used by the progamming language but which I don't want to use in text markup.
I seem to use the paired single-quotes ( ‘ ’ ) less often.
Here are German-style quotes: „Sein“ (will be better in a suitable font.)
Other favourites of mine are § Ç ß ä ö ü à é and ê ë è ï î ö ô along with Ä Ö Ü. The last characters should have been capital A O U with umlaut diacritics: if you see something else, you may have to change a browser VIEW setting for Encoding for your web browser.
If you are a Windows user who wants to copy and save these to a notepad cheatsheet, remember to save the file as UTF-8 on the SAVE AS menu. When you need an é in a hurry, holding down the ALT-key and typing 1 3 0 on the keypad and then releasing the ALT-key will place U-00E9 into most text.
IF you are a Windows user with an editor that which will not use displauy UNICODE with the default Arial Unicode MS font, well, there is always Notepad++ ... and it will allow you to save the file with or without the initial BOM bytes that indicate the encoding (which default notepad will not suppress.)
The minimal HTML header follows:
<html>For more details, here is a char-encoding link.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
Note: the above links have been set to open in a tab or window other than this blog page.
Labels:
charset,
codepage,
Curl,
fileformat.info,
HTML,
Notepad++,
oldjoelonsoftware,
Pilcrow Sign,
Section sign,
UNICODE
0
comments
at
1:44 PM
Monday, April 5, 2010
David Frum on the iPad
I posted this note over at his "forum".
The eBook mobile device has a few challenges: one is the rejection of commercial formats by the free-software movement. The MIT web formatting language CURL (www.curl.com) was spun-off as a company and so got no traction: but it offers a great deal more than PDF. It is more than just text and imaging: we need options to comapre versions/editions/translations and options to interpolate footnotes or side-pane footnotes and to link to eTexts from footnotes and options for our marginalia, notes and annotations. Microsoft OneNote 2007 on a netbook is about the best thing at the moment.
A thinking person's eBook viewer is NOT a web browser. I ahve some notes on the topic over at aule-browser.com
Other formats include Djvu, Daisy, JBig2, MobiPocket, Plucker
EPub is basically just a ZIP file
The Curl format is a much richer alternative to HTML5 or the Literature Markup Language due to the availability of macros and user-defined formats.
Another long-shot: www.rebol.com or www.rebol.net with the arrival of Rebol3
The most neglected way to index and explore text: ICON as in arizona.edu/ICON or ObjectIcon at code.google.com (from the folks who brought SNOBOL to the humanities.)
The eBook mobile device has a few challenges: one is the rejection of commercial formats by the free-software movement. The MIT web formatting language CURL (www.curl.com) was spun-off as a company and so got no traction: but it offers a great deal more than PDF. It is more than just text and imaging: we need options to comapre versions/editions/translations and options to interpolate footnotes or side-pane footnotes and to link to eTexts from footnotes and options for our marginalia, notes and annotations. Microsoft OneNote 2007 on a netbook is about the best thing at the moment.
A thinking person's eBook viewer is NOT a web browser. I ahve some notes on the topic over at aule-browser.com
Other formats include Djvu, Daisy, JBig2, MobiPocket, Plucker
EPub is basically just a ZIP file
The Curl format is a much richer alternative to HTML5 or the Literature Markup Language due to the availability of macros and user-defined formats.
Another long-shot: www.rebol.com or www.rebol.net with the arrival of Rebol3
The most neglected way to index and explore text: ICON as in arizona.edu/ICON or ObjectIcon at code.google.com (from the folks who brought SNOBOL to the humanities.)
Labels:
Curl,
Daisy,
David Frum,
Djvu,
ebook,
ePub,
HTML5,
iPad,
JBig2,
macro,
MobiPocket,
Plucker,
UNICODE
0
comments
at
3:50 PM
Monday, March 22, 2010
Schwitters' Gesetztes Bildgedicht in a Japanese variant
Using the Curl browser plugin you can view this Japanese version of Kurt Schwitters' "Gesetztes Bildgedicht".
The selection of UNICODE Hiragana alternatives is my own.
The selection of UNICODE Hiragana alternatives is my own.
Subscribe to:
Posts (Atom)