[ESS] Make ESS support Non-English Character(etc, Chinese)[broadcast]

ronggui ronggui.huang at gmail.com
Fri May 19 04:32:44 CEST 2006


After many googling and tries,I finally fix the problem.
Here,I want to thanks Rodney for the useful helps.

The problem:
When I use Chinese character as plot title,it can NOT be displayed
correctly.(become something like ~~ or box).

First,I thought it is the problem of ESS,but it turns out it's the
problem of emacs.
After googling and tries I find that if I
set-buffer-process-coding-system to cn-gb-2312,Things go well.(of
course,the coding maybe else,depends on your locales)

Then I want to set it as default instead of
set-buffer-process-coding-system every time I use ESS.I add the
following lines to ~/.emacs

;;begin
(load "E:/Programs/emacs/ess-5.3.0/lisp/ess-site")
(setq load-path (cons
(expand-file-name "E:/Programs/emacs/ess-5.3.0/lisp/ess-site") load-path ))
(autoload 'R "ess-site" "" t)
(add-hook 'ess-post-run-hook (function (lambda ()
(set-buffer-process-coding-system 'cn-gb-2312 'cn-gb-2312))))
#end

If you change "E:/Programs/emacs/ess-5.3.0/lisp/ess-site"  according
to your situtation and change cn-gb-2312 to the proper coding,All will
be fine.

If you use Xemacs,add this lines to the init.el file will work as well,I think.

Hope this will be helpful to someone:)



在 06-5-15,Rodney Sparapani<rsparapa at mcw.edu> 写道:
> ronggui wrote:
>
> > You are right.It's not a problem of ESS but emacs.
> >
> > After I start ESS,I set-buffer-process-coding-system to
> > cn-gb-2312,everything goes well.
> >
> > Then may I ask how to set this variable so that I need not set it
> > every time by hand.
> >
> > emacs 21.3
> > ess 5.3.0
> >
> > Thanks.
>
> I guess you could try adding that to ess-site.el
>
> Rodney
>


-- 
黄荣贵
Deparment of Sociology
Fudan University




More information about the ESS-help mailing list