[ESS] [ESS-bugs] ess-mode 5.3.0; Accented characters

Rodney Sparapani rsparapa at mcw.edu
Fri May 19 18:30:10 CEST 2006


Michel Jacques wrote:

> Hello, Rodney,
>
> As a follow-up to my previous message and your answer.
>
> Using set-buffer-process-coding-system interactively in the R buffer 
> does the job. I am however trying to make this automatic. I tried to 
> add a hook for the inferior-ess-mode in my .emacs file, but it does 
> not work. I get an error message saying "No process" and R does not 
> start.
>
> I guess the problem is that the function is executed when the R buffer 
> is opened and so no R process is running at that time.
>
> So my question is: is there a way to add an instruction somewhere in a 
> file in the ess tree so that the function 
> set-buffer-process-coding-system is executed automatically after the R 
> process has started?
>
> Many thanks.
>
> Michel
>
Hi Michel:

Actually, this was just resolved in another thread.  Special thanks to
ronggui.huang at gmail.com who suggested the following:

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:)




More information about the ESS-help mailing list