GNU bug report logs -
#52918
29.0.50; to make use of ucd/Unihan_Readings.txt for kDefinition entry
Previous Next
Full log
Message #16 received at 52918 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Mon, 3 Jan 2022, Eli Zaretskii wrote:
>
> Suggested implementation:
>
> . add Makefile rules to produce a uni-unihan-readings.el file from
> Unihan_Readings.txt, which defines a char-table where each
> character has its kDefinition property value
>
A candidate for the Makefile rule to produce uni-unihan-readings.el
is
'''
#!/bin/sh
X='/usr/X/Projects/emacs-28.0.91/admin/unidata/Unihan_Readings.txt'
fgrep 'kDefinition' "$X" | sed -e '/^#/d' -e 's/^../#x/' | head -n 3
| awk '-F ' 'BEGIN {printf("(defvar
readings-table\n\t(make-char-table '\'readings-table' nil)\n\t\"Char
table of definitions for East Asian characters.\")\n")}
{printf("(aset readings-table %s \"%s\")\n", $1, $3)}'
'''
The result is
'''
(defvar readings-table
(make-char-table 'readings-table nil)
"Char table of definitions for East Asian characters.")
(aset readings-table #x3400 "(same as U+4E18 丘) hillock or mound")
(aset readings-table #x3401 "to lick; to taste, a mat, bamboo bark")
(aset readings-table #x3402 "(J) non-standard form of U+559C 喜, to
like, love, enjoy; a joyful thing")
'''
--
vl
This bug report was last modified 2 years and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.