I had this weird encoding issue for my Emacs and R environment. Display of
Chinese characters are all good with my .Rprofile setting
Sys.setlocale("LC_ALL","zh_CN.utf-8"); except the echo of input ones.

    > linkTexts[5]
          font
    "使用帮助"
    > functionNotExist()
    错误: 没有"functionNotExist"这个函数
    > fire <- "你好"
    > fire
    [1] "  "

As we can see, Chinese characters contained in the vector linkTexts,
Chinese error messages, and input Chinese characters all can be perfectly
shown, yet the echo of input characters were only shown as blank
placeholders.

sessionInfo() is here, which is as expected given the
Sys.setlocale("LC_ALL","zh_CN.utf-8"); setting:

    > sessionInfo()
    R version 2.15.2 (2012-10-26)
    Platform: i386-apple-darwin9.8.0/i386 (32-bit)

    locale:
    [1] zh_CN.utf-8/zh_CN.utf-8/zh_CN.utf-8/C/zh_CN.utf-8/C

    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods
base

    other attached packages:
    [1] XML_3.96-1.1

    loaded via a namespace (and not attached):
    [1] compiler_2.15.2 tools_2.15.2

And I have no locale settings in the .Emacs file.

To me, this seems to be an Emacs encoding issue, but I just don't know how
to correct it. Any idea or suggestion? Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to