-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
P59 R读json报错 #11
Comments
严格说起来不是 locale 问题,而是字符编码 encoding 的问题,你可以参考这个问答: x <- fromJSON('["Z\\u00FCrich"]')
print(x)
# [1] "Z\xfcrich"
nchar(x)
#Error in nchar(x) : invalid multibyte string 1
#Set the correct encoding
Encoding(x) <- "latin1"
print(x)
#[1] "Zürich" |
找到原因了吴老师。 |
代码前设置一下R的环境 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
是locale的问题吗?
The text was updated successfully, but these errors were encountered: