Skip to content

[core] Fix incorrect substring result for unicode characters - #9328

Open
ArnavBalyan wants to merge 2 commits into
apache:masterfrom
ArnavBalyan:arnavb/fix-sub-unicode-issu
Open

[core] Fix incorrect substring result for unicode characters#9328
ArnavBalyan wants to merge 2 commits into
apache:masterfrom
ArnavBalyan:arnavb/fix-sub-unicode-issu

Conversation

@ArnavBalyan

Copy link
Copy Markdown
Member

Purpose

  • Substring operations use UTF-16 indexes, which count certain unicode characters as two positions.
  • This splits 2 character positions incorrectly (such as emojis) and return an invalid result.
  • Fix this by counting and extracting complete unicode characters.

Tests

  • UT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant