Substring for Japanese characters #17719
Closed
natarajank11
started this conversation in
General
Replies: 1 comment
-
There're two char length units (CHARACTERS, OCTETS) for substring in SQL standard, but we don't support octets option at this time. You can cast to varbinary as the workaround: SELECT from_utf8(substr(varbinary '全角文字列全角文字列全角文字列全角文字列全角文字列全角文字列全角文字列全角文字列全',1,21));
_col0
----------------
全角文字列全角
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In Substring, every character is counted as one byte,
select substring('全角文字列全角文字列全角文字列全角文字列全角文字列全角文字列全角文字列全角文字列全',1,20);
Result is,
全角文字列全角文字列全角文字列全角文字列
My expectation to result in double byte character, should be
全角文字列全角文字列
Beta Was this translation helpful? Give feedback.
All reactions