Add support for Windows UTF-8 version of R
See original GitHub issueAn experimental build of R using UTF-8 as native encoding on Windows has been released recently, and here is the instruction: https://svn.r-project.org/R-dev-web/trunk/WindowsBuilds/winutf8/ucrt3/howto.html
I’m on Windows 10 20H2 and has set $LANG
to zh_CN.UTF-8
. After setting the codepage to 65001(UTF-8), the encoding in Rterm successfully switches to UTF-8, but the encoding in radian remains unchanged.
In most of the time the terminal and the graph can still handle CJK characters properly. But sometimes some messy codes show, like the red text in the screenshot.
I thought this issue came from Python itself, so I set $PYTHONUTF8
to 1
to force Python to use UTF-8, and ran python -m radian
instead of radian
. However it doesn’t work for radian. I also tried to directly change the encoding in radian, and then it crashed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:28 (12 by maintainers)
Top GitHub Comments
Only set
LANG
environment is not sufficient to make this work well, I must set locale manually by adding following code in my.Rprofile
.This is my
radian
version:when use raw radian without setting above code in my
.Rprofile
, the R sessionInfo and l10n_info indicateUTF-8
encoding isn’t work. When we read file with special character usingdata.table::fread
, some characters won’t be parsed correctly After settinglocale
, this works fine, and when we read file with special character usingdata.table::fread
, special characters can be parsed successfully.%USERPROFILE%\Documents\.Rprofile