This behaviour is reproducible on REL_12_STABLE and up to master
I don't believe that this is an erroneous behaviour, just a differing one, hence just a documentation change proposition
I suggest adding a clarification that this function works differently with libc and ICU providers because there is a difference in what a "word" is between them
In libc a word is a sequence of alphanumeric characters, separated by non-alphanumeric characters (as it is written in documentation right now) In ICU words are divided according to Unicode® Standard Annex #29 [1]
Similar issue was briefly discussed in [2]
The suggested documentation patch is attached (versions for REL_13_STABLE+ and for REL_12_STABLE only)
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.