We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c22789 commit d798e3cCopy full SHA for d798e3c
2 files changed
vlib/builtin/utf8.v
@@ -181,7 +181,7 @@ pub fn utf8_str_visible_length(s string) int {
181
// CJK Unified Ideographs Extension B-G
182
// TODO: remove this workaround for v2's parser
183
// vfmt off
184
- if (r >= 0x0f9f8880 && r <= 0xf09f8a8f) ||
+ if (r >= 0xf09f8880 && r <= 0xf09f8a8f) ||
185
(r >= 0xf09f8c80 && r <= 0xf09f9c90) ||
186
(r >= 0xf09fa490 && r <= 0xf09fa7af) ||
187
(r >= 0xf0a08080 && r <= 0xf180807f) {
vlib/builtin/utf8_test.v
@@ -97,3 +97,7 @@ fn test_wide_to_ansi() {
97
fn test_string_to_ansi_not_null_terminated() {
98
assert string_to_ansi_not_null_terminated('abc') == [u8(97), 98, 99]
99
}
100
+
101
+fn test_utf8_str_visible_length() {
102
+ assert utf8_str_visible_length('𝐀𝐁𝐂') == 3
103
+}
0 commit comments