-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Unicode not working in inf_mr() #62
Comments
For I can certainly revert 69f1279 if necessary. Thanks! |
I read the article you mentioned and I think I know where the discrepancy was coming from, the reason is because this line: Line 184 in 673d979
This assumes body is in system locale but HTML is should be automatically UTF-8 as declared in the meta tag. I think we should change it to something like this: if (is.raw(body)) {
body = rawToChar(body)
Encoding(body) = "UTF-8"
} I tested this and it fixes the issue. |
Great! That is also what I guessed (I should have declared the encoding explicitly). I'll commit the fix in a minute. Thanks! |
If I render through
rmarkdown::render
I get the expected "無限 月読" but if I try to useinf_mr
I just get this message and a blank output:It seems like this is coming from here: 69f1279
I tried to adjust the locale settings, if I do
Sys.setlocale("LC_ALL", "Ja_JP.UTF-8")
it fixes the above issue but now it doesn't decode the stdout correctly, I get:無限 <8c><8e><93>
Some more locale gymnastics within the document probably could fix that but I think
dynamic_site
shouldn't assume the body is in the system locale.My OS locale is English display and shift-JIS codepage.
The text was updated successfully, but these errors were encountered: