Commit graph

36 commits

Author SHA1 Message Date
Stephen Dennis
c666907066 Fix combining marks and format chars in width tables
SaveWidths() in buildFiles.cpp now checks General_Category before
East Asian Width: Mn/Me (nonspacing/enclosing marks) and Cf (format
chars like ZWJ, ZWNJ, ZWSP) are explicitly zero-width instead of
inheriting width 1 from their EAW property.

Move string_desc typedef from generated utf8tables.h into externs.h
so the utf/ pipeline is fully self-contained. Update Makefile.in to
auto-generate file preambles (header guards, includes) for both
utf8tables.h.txt and utf8tables.cpp.txt.

Regenerate DFA tables from corrected tr_widths.txt. Update sort_fn
test hashes to match the new collation-aware width tables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 08:46:37 -07:00
Stephen Dennis
824063e9a3 Accept combining characters and normalize input to NFC
Update CL_PRINT DFA to accept Unicode combining marks (Mn, Mc, Me
categories) instead of rejecting them at the network boundary. This
allows composed input like e + U+0301 to pass through to the normalizer.

Hook utf8_normalize_nfc() into save_command() so all UTF-8 input is
normalized to NFC before entering the command queue. The quick check
(utf8_is_nfc) short-circuits for ASCII-only input with zero overhead.

Regenerated CL_PRINT DFA: 155,134 code points included (was 154,200),
314 states / 91 columns (was 335 / 93).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:17:48 -07:00
Stephen Dennis
efefff7130 Update Unicode support from 10.0 to 16.0
Replace UnicodeData.txt and EastAsianWidth.txt with Unicode 16.0 (2024)
data files and regenerate all DFA state machines. This adds 18,181 new
printable code points and 156 new case mapping entries.

Add Windows build support for the utf/ pipeline tools (autoconf_win.h,
build_win.cmd) and guard iconv-dependent code in buildFiles.cpp with
#ifdef HAVE_ICONV_H so the core pipeline runs without iconv on Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 08:15:46 -07:00
Stephen Dennis
a268f6447e Remove training spaces. 2025-04-06 19:32:10 -06:00
Stephen Dennis
dbd7cb4267 Use nullptr instead of NULL. 2025-03-30 09:10:10 -06:00
Stephen Dennis
b26fd96768 Update EastAsianWidth to Unicode 7.0.0 (and fix a trailing space bug). 2022-03-10 12:38:07 -07:00
Stephen Dennis
4610499aa8 Update to Unicode 6.3. 2018-10-27 19:46:11 +00:00
brazilofmux
c86506c3ba Improve automated mapping of UTF-8 to ASCII, CP437, Latin-1, and Latin-2. 2014-09-15 17:52:20 -06:00
brazilofmux
eb78ef1fda Consume v5.2 of EastAsianWidth.txt to develop ConsoleWidth() helper function. 2013-03-06 19:10:57 -07:00
brazilofmux
b18c0f4be3 Add autoconf 2.68 for utf and convert/omega. 2011-11-04 19:52:27 -07:00
brazilofmux
6aa4d2e0fd Fix Ubuntu compiler warnings. 2010-11-28 18:19:54 -08:00
brazilofmux
36f88937c4 Add default_charset configuration option with aditional Latin-2 and CP437 conversions. 2010-06-16 10:00:20 -07:00
Stephen Dennis
af46a2c701 Fix build break in utf on Debian GCC 4.4. 2010-02-03 23:11:56 -08:00
brazilofmux
212baf428a Add table for determining a code point's combining class. 2009-03-08 21:54:48 -07:00
Brazil
1165f7d096 Fix build of ./utf directory on newer compilers. 2008-04-15 07:42:01 -07:00
brazilofmux
2654f63498 Change mapping output file name and generate tr_decimal_value.txt 2008-04-12 09:40:22 -07:00
brazilofmux
0fedaa437b Add multi-mappings. 2008-04-12 09:40:17 -07:00
brazilofmux
00558c7b4d Update UTF-8 to ASCII and Latin-1 down conversions. 2008-04-12 09:39:13 -07:00
brazilofmux
12d4d85f45 Replace StringprepProhibited.txt 2008-04-12 09:31:18 -07:00
brazilofmux
fe4d1eafd8 Remove upper, lower, and title mappings for undefined or excluded characters. 2008-04-12 09:31:10 -07:00
brazilofmux
95ac2a4a09 Begin to establish rules for which characters TinyMUX will prohibit. 2008-04-12 09:31:06 -07:00
brazilofmux
70202ee309 Replace buildStringprepPrintable.pl 2008-04-12 09:31:02 -07:00
brazilofmux
59b3ac60af Replace buildDecompositions.pl 2008-04-12 09:24:15 -07:00
brazilofmux
926e6b6162 Build cl_PrivateUse.txt without buildPrivateUse.pl 2008-04-12 09:24:11 -07:00
brazilofmux
9d51415019 Replace buildToLower.pl, buildToUpper.pl, and buildToTitle.pl. 2008-04-12 09:24:07 -07:00
brazilofmux
835fd65aee Remove buildUnicodeMaster.pl. 2008-04-12 09:24:02 -07:00
brazilofmux
095628b84a Reconsile Decompositions.txt 2008-04-12 09:23:58 -07:00
brazilofmux
0737a75dee Reconcile output of buildFiles with UnicodeMaster.txt 2008-04-12 09:23:54 -07:00
brazilofmux
700617f3b6 Add Upper, Lower, and Title case. 2008-04-12 09:11:46 -07:00
brazilofmux
f117a3567c Add ISO Comment. 2008-04-12 09:11:42 -07:00
brazilofmux
2c25330bc1 Add Unicode1Name. 2008-04-12 09:11:38 -07:00
brazilofmux
bc8062179e Add Bidi_Mirrored. 2008-04-12 09:11:34 -07:00
brazilofmux
0a9ff5b09b Add Numeric_Type and Numeric_Value fields. 2008-04-12 09:11:30 -07:00
brazilofmux
9098af306d Decode and recode Decomposition Type and Mapping. 2008-04-12 09:11:26 -07:00
brazilofmux
d7fed0a54d Break out of loop for Category and BiDi once a match has been made. 2008-04-12 09:11:19 -07:00
brazilofmux
2897288b9e Start buildFiles.cpp 2008-04-12 08:52:43 -07:00