From 5204faf8187f9c9c52ed6d7e0417422a6cfa78db Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Mon, 18 Aug 2025 00:40:05 +0300 Subject: [PATCH v4] Further clarify documentation for the initcap function * Document that title case is used for digraphs * Reference particular ICU function used * Add note about purpose of the function --- doc/src/sgml/func/func-string.sgml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/src/sgml/func/func-string.sgml b/doc/src/sgml/func/func-string.sgml index 3eec93eb339..022b9f3c4cf 100644 --- a/doc/src/sgml/func/func-string.sgml +++ b/doc/src/sgml/func/func-string.sgml @@ -693,12 +693,19 @@ text - Converts the first letter of each word to upper case and the - rest to lower case. When using the libc locale - provider, words are sequences of alphanumeric characters separated - by non-alphanumeric characters; when using the ICU locale provider, - words are separated according to - Unicode Standard Annex #29. + Converts the first letter of each word to upper case (or title case + if the letter is a digraph) and the rest to lower case. When using + the libc or builtin locale + provider, words are sequences of alphanumeric characters separated by non-alphanumeric characters; + when using the ICU locale provider, words are separated according to + u_strToTitle ICU function. + + + This function is primarily used for convenient + display, and the specific result should not be relied upon because of + the differences between locale providers and between different + ICU versions. If specific word boundary rules are desired, + it is recommended to write a custom function. initcap('hi THOMAS') -- 2.39.5 (Apple Git-154)