Skip to content

Commit

Permalink
Reproduce UTF8 substring issue
Browse files Browse the repository at this point in the history
Ref: #1064
  • Loading branch information
sodre committed Apr 12, 2021
1 parent 63f62d4 commit 34fc68d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"string": "the QuIcK brOwn fox",
"zeroIndex" : 0,
"threeIndex" : 3,
"trimMe" : " tuna "
"trimMe" : " tuna ",
"utf8String": "\uD83D\uDC47\uD83D\uDD34 UTF-8 String"
},

"spec": {
Expand Down Expand Up @@ -44,7 +45,8 @@
"custom2": "=substring('the quick brown fox', 16, 19)",
//
// verify that we can actually lookup start and end indices
"advancedLookupRanges" : "=substring(@(2,string), @(2,zeroIndex), @(2,threeIndex))"
"advancedLookupRanges" : "=substring(@(2,string), @(2,zeroIndex), @(2,threeIndex))",
"utf8Substring": "=substring(@(2,utf8String), 3, 15)"
},
"trim" :{
"trimed" : "=trim(@(2,trimMe))"
Expand All @@ -61,6 +63,7 @@
"string" : "the QuIcK brOwn fox",
"zeroIndex" : 0,
"threeIndex" : 3,
"utf8String": "\uD83D\uDC47\uD83D\uDD34 UTF-8 String",
//
// from the input, but overwritten by modify
"trimMe" : "tuna",
Expand Down Expand Up @@ -88,7 +91,8 @@
"basic2": "QuIcK",
"custom1": "the quick brown",
"custom2": "fox",
"advancedLookupRanges": "the"
"advancedLookupRanges": "the",
"utf8Substring": "UTF-8 String"
},
"trim" :{
"trimed" : "tuna"
Expand Down

0 comments on commit 34fc68d

Please sign in to comment.