You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I can see, this occurs because split_lines() attempts to (unintentionally) re-encode text into the active locale. Some options given the implementation here:
I can do 2 by myself since it appears to be simple enough. I think I used this approach originally, but I don't remember why I reverted it and used textConnection() instead. Thanks!
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Small reprex:
The generated parameter for
test
is replaced with its UTF-8 code point:From what I can see, this occurs because
split_lines()
attempts to (unintentionally) re-encode text into the active locale. Some options given the implementation here:knitr/R/utils.R
Lines 605 to 611 in 0a9a502
Use
textConnection(x, encoding = "bytes")
and then re-mark the encoding after reading from the connection,Use
strsplit()
, but handle the special case wherex
is an empty string.@yihui let me know if you have a preference here and I can try to put together a PR.
The text was updated successfully, but these errors were encountered: