From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [168.235.81.73]) by inbox.vuxu.org (Postfix) with ESMTP id C867628856 for ; Sat, 5 Oct 2024 14:39:32 +0200 (CEST) Received: from chrisfroeschl.de ([185.183.157.17]) by 9front; Sat Oct 5 08:38:29 -0400 2024 Message-ID: From: Chris A. Fröschl Date: Sat, 05 Oct 2024 12:36:25 +0000 To: 9front@9front.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: structured generic rails-based hypervisor proxy Subject: [9front] [PATCH] ktrans: updates ktrans to use pinyin by default, documents $zidian env Reply-To: 9front@9front.org Precedence: bulk Pinyin is by far more commonly used than wubi. Therefore, the default should be adjusted. Documentation for the $zidian env variable for setting a custom character mapping file is now also documented. --- diff 6ebfbaa82641fcb727858aeb7dd790a3ac10864f 3ad6886ad077a9f42647129243b41378264433b8 --- a/sys/man/1/ktrans Sat Oct 5 02:43:38 2024 +++ b/sys/man/1/ktrans Sat Oct 5 14:36:25 2024 @@ -189,11 +189,12 @@ we have successfully communicated to ktrans when to reset the explicit match buffer without needing to explicitly give a ctl-l character. .SS CHINESE -Implicit conversion converts punctuation. Explicit matches -use a dictionary to convert a series of Latin characters -into Hanzi. By default a Wubizixing input dictionary -is used. Additionally a Pinyin input dictionary -is provided. +The Pinyin input mapping method to simplified characters is used by +default. Other input method mapping files are provided at /lib/ktrans +and can be used by setting the $zidian environment variable to the +wanted file. Implicit conversion is done for punctuation only. +Explicit conversion interprets latin characters as their $zidian +counterparts to do lookup of chinese characters. .SS VIETNAMESE Implicit conversion is modeled after Telex, supporting standard diacritic suffixes. --- a/sys/src/cmd/ktrans/main.c Sat Oct 5 02:43:38 2024 +++ b/sys/src/cmd/ktrans/main.c Sat Oct 5 14:36:25 2024 @@ -945,7 +945,7 @@ Hmap **m; } initdicttab[] = { "jisho", "kanji.dict", &jisho, - "zidian", "wubi.dict", &zidian, + "zidian", "pinyin.dict", &zidian, }; mainstacksize = 8192*2;