Avoid global LC_CTYPE dependency in pg_locale_icu.c. ICU still depends on libc for compatibility with certain historical behavior for single-byte encodings. Make the dependency explicit by holding a locale_t object when required.
We should consider a better solution in the future, such as decoding the text to UTF-32 and using u_tolower(). That would be a behavior change and require additional infrastructure though; so for now, just avoid the global LC_CTYPE dependency. Reviewed-by: Chao Li <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0a90df58cf38cf68d59c6841513be98aeeff250e Modified Files -------------- src/backend/utils/adt/pg_locale_icu.c | 47 ++++++++++++++++++++++++++++++++--- src/include/utils/pg_locale.h | 1 + 2 files changed, 44 insertions(+), 4 deletions(-)
