Displaying 2 results from an estimated 2 matches for "stri_length".
Did you mean:
str_length
2020 Jun 27
1
Error in substring: invalid multibyte string
...as well?
Incidentally the analogous stringi function stri_sub works fine in this
case:
> stringi::stri_sub("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100)
[1] "<I>Jens Oehlschl\xe4gel-Akiyoshi"
But the stringi analog to nchar gives a similar warning:
> stringi::stri_length("<I>Jens Oehlschl\xe4gel-Akiyoshi")
[1] NA
Warning message:
In stringi::stri_length("<I>Jens Oehlschl\xe4gel-Akiyoshi") :
invalid UTF-8 byte sequence detected; try calling stri_enc_toutf8()
On Sat, Jun 27, 2020 at 2:12 AM Ivan Krylov <krylov.r00t at gmail.com&...
2020 Jun 26
2
Error in substring: invalid multibyte string
Hi all,
I'm getting the following error from substring:
> substr("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100)
Error in substr("<I>Jens Oehlschl\xe4gel-Akiyoshi", 1, 100) :
invalid multibyte string at '<e4>gel-A<6b>iyoshi'
Is that normal / intended? I've tried setting the Encoding/locale to
Latin-1/UTF-8 but that does not help. nchar