unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Van Ly <van.ly@sdf.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52918@debbugs.gnu.org
Subject: bug#52918: 29.0.50; to make use of ucd/Unihan_Readings.txt for kDefinition entry
Date: Mon, 17 Jan 2022 18:25:26 +0000 (UTC)	[thread overview]
Message-ID: <ec4831ad-2561-ce9c-9ee6-695c2f9ebbb@SDF.ORG> (raw)
In-Reply-To: <83czl8diw6.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]

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

  parent reply	other threads:[~2022-01-17 18:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-31 17:55 bug#52918: 29.0.50; to make use of ucd/Unihan_Readings.txt for kDefinition entry Van Ly
2022-01-03 13:54 ` Eli Zaretskii
2022-01-04 15:13   ` Van Ly
2022-01-17 18:25   ` Van Ly [this message]
2022-01-18 11:30     ` Van Ly
     [not found]   ` <Pine.NEB.4.64.2201230208400.10119@faeroes.freeshell.org>
2022-01-23  6:00     ` Eli Zaretskii
2022-01-23 11:22       ` Van Ly
2022-01-23 11:40         ` Eli Zaretskii
2023-07-25 15:44           ` Eli Zaretskii
2023-07-25 18:18             ` Van Ly via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec4831ad-2561-ce9c-9ee6-695c2f9ebbb@SDF.ORG \
    --to=van.ly@sdf.org \
    --cc=52918@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).