TUGboat 42:1 (2021)
The Communications of the TeX Users Group

Title: UTF-8 installations of CWEB

Summary: changing cweave and ctangle to read/write the Unicode BMP.

Full text of article: publicly available now.

Author: Igor Liferenko

Publication: TUGboat volume 42, number 1 (2021), pages 81-82

DOI (this page): 10.47397/tb/42-1/tb130liferenko-cweb
(previous doi - next doi)

Category: Software & Tools

Difficulty: Advanced

Abstract: We show how to implement UTF-8 support in CWEB by adding the arrays xord and xchr. Immediately after reading a Unicode character from an input file, we convert it to an 8-bit character using xord. On output the reverse operation is done using xchr. This allows us to leave core algorithms of CWEB unchanged.

References:

  1. Knuth, D. and Levy, S. The CWEB System of Structured Documentation, 1993. ISBN 0-201-57569-8
  2. Source of the present implementation. github.com/igor-liferenko/cweb
  3. Single Unix Specification. Introduction to ISO C Amendment 1 (Multibyte Support Environment). unix.org/version2/whatsnew/login_mse.html

TUGboat 42:1, 2021 (issue 130)   [generated 2021-09-30]
TUG home page; webmaster; facebook; twitter;   (via DuckDuckGo)