widths
ModuleDisplay widths of Unicode characters, as libpq computes them for the
caret under an error position (ucs_wcwidth in PostgreSQL 18's
src/common/wchar.c, over the tables PostgreSQL generates from Unicode).
Contents
Rust
pub const EAST_ASIAN_FW: &[(u32, u32)] = &[ (0x1100, 0x115F), (0x231A, 0x231B), (0x2329, 0x232A), (0x23E9, 0x23EC), (0x23F0, 0x23F0), (0x23F3, 0x23F3), (0x25FD, 0x25FE), (0x2614, 0x2615), (0x2630, 0x2637), (0x2648, 0x2653), (0x267F, 0x267F), (0x268A, 0x268F), (0x2693, 0x2693), (0x26A1, 0x26A1), (0x26AA, 0x26AB), (0x26BD, 0x26BE), (0x26C4, 0x26C5), (0x26CE, 0x26CE), (0x26D4, 0x26D4), (0x26EA, 0x26EA), (0x26F2, 0x26F3), (0x26F5, 0x26F5), (0x26FA, 0x26FA), (0x26FD, 0x26FD), (0x2705, 0x2705), (0x270A, 0x270B), (0x2728, 0x2728), (0x274C, 0x274C), (0x274E, 0x274E),East Asian wide and fullwidth characters (width 2): unicode_east_asian_fw_table.h.
Rust
pub const NONSPACING: &[(u32, u32)] = &[ (0x00AD, 0x00AD), (0x0300, 0x036F), (0x0483, 0x0489), (0x0591, 0x05BD), (0x05BF, 0x05BF), (0x05C1, 0x05C2), (0x05C4, 0x05C5), (0x05C7, 0x05C7), (0x0600, 0x0605), (0x0610, 0x061A), (0x061C, 0x061C), (0x064B, 0x065F), (0x0670, 0x0670), (0x06D6, 0x06DD), (0x06DF, 0x06E4), (0x06E7, 0x06E8), (0x06EA, 0x06ED), (0x070F, 0x070F), (0x0711, 0x0711), (0x0730, 0x074A), (0x07A6, 0x07B0), (0x07EB, 0x07F3), (0x07FD, 0x07FD), (0x0816, 0x0819), (0x081B, 0x0823), (0x0825, 0x0827), (0x0829, 0x082D), (0x0859, 0x085B), (0x0890, 0x089F),Non-spacing characters (width 0): unicode_nonspacing_table.h.