Showing posts with label Perapera. Show all posts
Showing posts with label Perapera. Show all posts
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.
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?
Subscribe to:
Posts (Atom)