From 5c40364dd6d9c6a260c8965dffe2e066642d6f79 Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Thu, 7 Mar 2024 11:15:06 -0800 Subject: Unicode case mapping tables and functions. Implements Unicode simple case mapping, in which all code points map to exactly one other code point unconditionally. These tables are generated from UnicodeData.txt, which is already being used by other infrastructure in src/common/unicode. The tables are checked into the source tree, so they only need to be regenerated when we update the Unicode version. In preparation for the builtin collation provider, and possibly useful for other callers. Discussion: https://postgr.es/m/ff4c2f2f9c8fc7ca27c1c24ae37ecaeaeaff6b53.camel%40j-davis.com Reviewed-by: Peter Eisentraut, Daniel Verite, Jeremy Schneider --- src/common/wchar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/wchar.c') diff --git a/src/common/wchar.c b/src/common/wchar.c index 7e7a7507d5c..a238c0106c6 100644 --- a/src/common/wchar.c +++ b/src/common/wchar.c @@ -477,8 +477,8 @@ pg_utf2wchar_with_len(const unsigned char *from, pg_wchar *to, int len) /* - * Map a Unicode code point to UTF-8. utf8string must have 4 bytes of - * space allocated. + * Map a Unicode code point to UTF-8. utf8string must have at least + * unicode_utf8len(c) bytes available. */ unsigned char * unicode_to_utf8(pg_wchar c, unsigned char *utf8string) -- cgit v1.2.3