[
https://issues.apache.org/jira/browse/HIVE-6843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973880#comment-13973880
]
Jason Dere commented on HIVE-6843:
----------------------------------
The string literal does interpret "\uD801" as a single character, and
"\uD801\uDC00" as a single code point (got the example character from
http://www.oracle.com/technetwork/articles/javase/supplementary-142654.html):
{noformat}
String str1 = "123\uD801\uDC00456";
System.out.println("str1 length=" + str1.length() + ", codePointCount=" +
str1.codePointCount(0, str1.length()));
str1 length=8, codePointCount=7
{noformat}
So if we count things by unicode code points, the "4" would be at index 4 (for
0-based index).
> INSTR for UTF-8 returns incorrect position
> ------------------------------------------
>
> Key: HIVE-6843
> URL: https://issues.apache.org/jira/browse/HIVE-6843
> Project: Hive
> Issue Type: Bug
> Components: UDF
> Affects Versions: 0.11.0, 0.12.0
> Reporter: Clif Kranish
> Assignee: Szehon Ho
> Priority: Minor
> Attachments: HIVE-6843.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)