diff options
author | Andreas Scherer <andreas_tex@freenet.de> | 2022-08-20 22:43:53 +0000 |
---|---|---|
committer | Andreas Scherer <andreas_tex@freenet.de> | 2022-08-20 22:43:53 +0000 |
commit | 1f554b5e55fb76a98420dbf16db38046a8370f60 (patch) | |
tree | b5c7a788aa6b7115a939b8e5b9ddcca16ac1be09 /Build/source/texk/web2c/man | |
parent | 45cea7def9ed0e1640c8c30cf361bf59a6372457 (diff) |
[CWEB] Add option '+u' for CTANGLE.
Option 'ctangle +u' extends the transliteration mechanism for ``poor
man's UTF-8'. Instead of extending the 'translit' table (or replacing it
with a dynamic data structure), CTANGLE skips all but the last of a
sequence of high-bit bytes representing a single UTF-8 character. Only
the last high-bit byte is used as the index into 'translit' as before.
Example: In ``classic ASCII'', the German word 'grün' was transformed
into 'gruen' with the transliteration '@l fc ue' (from the Western
European codepage ISO/IEC 8859-1; see file cweb_ecma94.w for context).
With UTF-8 encoded input and 'ctangle +u', the first (starter) byte 'c3'
(1100.0011) is skipped and the second (continuing) byte 'bc' is used to
look up the transliteration for 'ü' (latin small letter u with diaeresis),
so '@l bc ue' can be used to get 'gruen' in the C output.
Note that this is not a general UTF-8 transliteration because there are
tons of possible collisions, e.g., '¼' (vulgar fraction one quarter) is
'c2 bc' in UTF-8 and would be transformed into 'ue' as well.
git-svn-id: svn://tug.org/texlive/trunk@64157 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/man')
-rw-r--r-- | Build/source/texk/web2c/man/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/man/cweb.man | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/man/ChangeLog b/Build/source/texk/web2c/man/ChangeLog index 95a11e7d444..b8a2a842f05 100644 --- a/Build/source/texk/web2c/man/ChangeLog +++ b/Build/source/texk/web2c/man/ChangeLog @@ -1,3 +1,7 @@ +2022-08-21 Andreas Scherer <https://ascherer.github.io> + + * cweb.man: New option '+u' for CTANGLE. + 2022-06-05 Andreas Scherer <https://ascherer.github.io> * ctwill.man: CWEB 4.8 release. diff --git a/Build/source/texk/web2c/man/cweb.man b/Build/source/texk/web2c/man/cweb.man index fd481db48d4..b1d051551fe 100644 --- a/Build/source/texk/web2c/man/cweb.man +++ b/Build/source/texk/web2c/man/cweb.man @@ -14,7 +14,7 @@ . ftr VB CB . ftr VBI CBI .\} -.TH "CWEB" "1" "July 27, 2021" "Web2c @VERSION@" "General Commands Manual" +.TH "CWEB" "1" "August 20, 2022" "Web2c @VERSION@" "General Commands Manual" .hy .SH NAME .PP @@ -70,7 +70,7 @@ There are, however, a few differences worth noting: .IP \[bu] 2 Options \f[B]--help\f[R], \f[B]--quiet\f[R], \f[B]--verbose\f[R], \f[B]--version\f[R], and flags \f[B]+c\f[R], \f[B]-i\f[R], \f[B]-o\f[R], -and \f[B]+lX\f[R] are new in CWEBbin and TeX\ Live. +\f[B]+u\f[R], and \f[B]+lX\f[R] are new in CWEBbin and TeX\ Live. .IP \[bu] 2 Option \f[B]+lX\f[R] is accompanied by several wrapper files for \f[B]cwebmac.tex\f[R] with translated captions for German @@ -120,6 +120,8 @@ The first batch of options are common to both \f[B]ctangle\f[R] and There is one other option applicable to \f[B]ctangle\f[R] only: .IP \[bu] 2 \f[B]+k\f[R]: keep separators in numeric literals in the output +.IP \[bu] 2 +\f[B]+u\f[R]: transliterate UTF-8 charcters in C code .PP There are seven other options applicable to \f[B]cweave\f[R] only: .IP \[bu] 2 |