It&#x27;s not <i>super</i> convenient, but one can operate on UTF-8 buffers with ICU via UText (see e.g. <a href="http:&#x2F;&#x2F;userguide.icu-project.org&#x2F;strings&#x2F;utext#TOC-Example:-Counting-the-Words-in-a-UTF-8-String" rel="nofollow">http:&#x2F;&#x2F;userguide.icu-project.org&#x2F;strings&#x2F;utext#TOC-Example:-...</a>)<p>Not everything is doable this way, but quite a lot actually is.