[ 
https://issues.apache.org/jira/browse/ARROW-11693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17307357#comment-17307357
 ] 

Eduardo Ponce commented on ARROW-11693:
---------------------------------------

We can leverage *utf8proc* which is already a dependency for some string 
operations in compute kernel. Specifically, use the *utf8proc_iterate* function 
(https://juliastrings.github.io/utf8proc/doc/utf8proc_8h.html#a48041dd763513b314763f5b40fad50b0)

> [C++] Add string length kernel
> ------------------------------
>
>                 Key: ARROW-11693
>                 URL: https://issues.apache.org/jira/browse/ARROW-11693
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Neal Richardson
>            Assignee: Eduardo Ponce
>            Priority: Major
>             Fix For: 4.0.0
>
>
> We have "binary_length" but that doesn't handle UTF-8 the way we need for 
> this. Example (from R):
> {code}
> > string <- "áéíóú"
> > nchar(string)
> [1] 5
> > arrow:::call_function("binary_length", Scalar$create(string))
> Scalar
> 10
> {code}
> cc [~maartenbreddels] [~apitrou] [~jorisvandenbossche]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to