Re: Initcap works differently with different locale providers
Alexander Korotkov <aekorotkov@gmail.com>
From: Alexander Korotkov <aekorotkov@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Oleg Tselebrovskiy <o.tselebrovskiy@postgrespro.ru>,
pgsql-docs@lists.postgresql.org
Date: 2025-08-16T21:29:52Z
Lists: pgsql-docs
On Wed, Jul 30, 2025 at 10:58 PM Jeff Davis <pgsql@j-davis.com> wrote: > > On Mon, 2025-07-28 at 13:20 +0300, Alexander Korotkov wrote: > > I can confirm inicap works with libc and libicu as you stated. The > > documentation patch looks good to me. I’ve written a commit message. > > The REL_12_STABLE branch is not relevant anymore as it’s out of > > support. I’m going to push this if no objections. > > Apologies for the late review. > > First, it doesn't mention the "builtin" provider, which uses the same > word break rules as libc. > > Second, word boundaries can be complex, and I'm wondering if we should > not be so precise about what ICU does or doesn't do. For instance, ICU > has options like U_TITLECASE_ADJUST_TO_CASED, > U_TITLECASE_NO_BREAK_ADJUSTMENT, etc.[1], and I'm not sure exactly > which one of those we use. I think none of these options is used, because options could be processed by ucasemap_toTitle() [1] while we use u_strToTitle() [2] which takes no options. Links 1. https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ucasemap_8h.html#aa49d8b403bd91c52f127fe80679bac11 2. https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/ustring_8h.html#a47602e2c2012d77ee91908b9bbfdc063 ------ Regards, Alexander Korotkov Supabase
Commits
-
Further clarify documentation for the initcap function
- f8ce9ed220b5 19 (unreleased) landed
-
Revert "Clarify documentation for the initcap function"
- 0edaaa8f2978 14.19 landed
- 06633271ec40 13.22 landed
- 098c27dee4c1 15.14 landed
- b862465dba33 16.10 landed
- 3b3aa1f651c7 17.6 landed
- 2ae8280d16c9 18.0 landed
-
Clarify documentation for the initcap function
- 907ac2ca30bb 13.22 landed
- 276b022ec05b 14.19 landed
- 9af075c4e27e 15.14 landed
- d861b9282261 16.10 landed
- 3c05d4d3433e 17.6 landed
- 1fe9e3822c4e 18.0 landed
- c2c2c7e22566 19 (unreleased) landed