[ESS] Emacs' coding system in R-help buffer.

gerald.jean at dgag.ca gerald.jean at dgag.ca
Tue Feb 23 15:43:24 CET 2010


ess-help-bounces at stat.math.ethz.ch a écrit sur 2010/02/23 05:37:32 :

>
> >>>>> "gj" == gerald jean <gerald.jean at dgag.ca>
> >>>>>     on Mon, 22 Feb 2010 11:44:14 -0500 writes:
>
>     gj> Hello,
>
>     gj> I am using ESS-5.7.1 from Emacs 22.3.1 on a 64-bit RedHat
> Linux server, R
>     gj> 2.10.0, Splus 8.1.1
>
>     gj> When I open a R-help buffer from a "*.r" buffer a new buffer
> is open and
>     gj> the help, for the requested function, is displayed.  But
> some characters
>     gj> are in a "hard to read" form for human eyes.  For example,
> the following is
>     gj> a portion of the "history" help file.
>
>     gj>
>
#############################################################################################

>     gj> max.show: the maximum number of lines to show.
> â\200\230Infâ\200\231 will
>     gj> give all of
>     gj> the currently available history.
>
>     gj> reverse: logical. If true, the lines are shown in reverse order.
Note:
>     gj> this is not useful when there are continuation lines.
>
>     gj> pattern: A character string to be matched against the lines of
the
>     gj> history
>
>     gj> ...: Arguments to be passed to â\200\230grepâ\200\231 when doing
the
>     gj> matching.
>     gj>
>
###########################################################################################

>
>     gj> I am also using Splus for a long time, from ESS, on the same
> machine and
>     gj> never had this sort of problem.
>
> Well, I think S+ (as it is finally called!) does not support
> internationalization AFAIK (it may do, using Microsoft concepts
> on Windows, but standard ones).
>
>     gj> The coding-system for the R-help buffer
>     gj> is:
>
>     gj> Coding system for saving this buffer:
>     gj> Not set locally, use the default.
>     gj> Default coding system (for new files):
>     gj> 1 -- iso-latin-1 (alias: iso-8859-1 latin-1)
>
>     gj> Coding system for keyboard input:
>     gj> nil
>     gj> Coding system for terminal output:
>     gj> u -- utf-8 (alias of mule-utf-8)
>
>     gj> Defaults for subprocess I/O:
>     gj> decoding: 1 -- iso-latin-1-unix
>
>     gj> encoding: 1 -- iso-latin-1-unix
>
> etc etc etc
>
> The problem in such cases is that  Emacs and R do not agree
> about the coding system to use.
>
> The above indicates to me, that your Emacs configuration
> is preferring iso-latin-1  in some ways,
> and I know that R nowadays strongly prefers UTF-8 (Unicode),
> of course all depending on the localization aka 'LOCALE' ...
> which I know is typically UTF-8 on Redhat.
>
> I think .. that Emacs 23.1  may solve such problems somewhat
> automatically for you, but I don't know if you can easily
> upgrade to that.

You are right I can't easily upgrad to Emacs 23.1, but if necessary I'll
try to make a case with our IT people.

> Otherwise, you should try to customize your Emacs 22.3 to prefer
> Unicode (UTF-8) over ISO-latin-1.

I did customize Emacs 22.3 to prefer ISO-latin-1 a little while ago because
I had problems with LaTeX files (I also heavily use LaTeX through Emacs'
AucTeX) with europeans accents; if I go to UTF-8 will the problems with
LaTeX come back?
>
> Alternatively, you change the locale before starting Emacs...

Here are the defaults locale settings:

Sys.getlocale("LC_ALL")

[1] "LC_CTYPE=en_US.UTF-8;
     LC_NUMERIC=C;
     LC_TIME=en_US.UTF-8;
     LC_COLLATE=en_US.UTF-8;
     LC_MONETARY=C;
     LC_MESSAGES=en_US.UTF-8;
     LC_PAPER=en_US.UTF-8;
     LC_NAME=C;
     LC_ADDRESS=C;
     LC_TELEPHONE=C;
     LC_MEASUREMENT=en_US.UTF-8;
     LC_IDENTIFICATION=C"

can I change them in my bash profile?  If yes which ones should be changed
and to what values, an example would greatly help.

>
> Can other Redhat users chime in?
>
> Regards,
> Martin Maechler, ETH Zurich

Thanks a lot for your insights Martin,

Gérald
>
>     gj> Both for S+ and R the coding-systems are identical, I ran
> diff after saving
>     gj> the corresponding coding-systems, no differences???
>
>     gj> Any clues?  Thanks,
>
>     gj> Gérald Jean
>     gj> Conseiller senior en statistiques,
>     gj> VP Planification et Développement des Marchés,
>     gj> Desjardins Groupe d'Assurances Générales
>     gj> télephone            : (418) 835-4900 poste (7639)
>     gj> télecopieur          : (418) 835-6657
>     gj> courrier électronique: gerald.jean at dgag.ca
>
>     gj> "In God we trust, all others must bring data"  W. Edwards Deming
>
>
>
>     gj> Le message ci-dessus, ainsi que les documents
> l'accompagnant, sont destinés
>     gj> uniquement aux personnes identifiées et peuvent contenir des
> informations
>     gj> privilégiées, confidentielles ou ne pouvant être divulguées.
> Si vous avez
>     gj> reçu ce message par erreur, veuillez le détruire.
>
>     gj> This communication ( and/or the attachments ) is intended for
named
>     gj> recipients only and may contain privileged or confidential
information
>     gj> which is not to be disclosed. If you received this
> communication by mistake
>     gj> please destroy all copies.
>
>
>
>
>     gj> Faites bonne impression et imprimez seulement au besoin !
>     gj> Think green before you print !
>
>     gj> Le message ci-dessus, ainsi que les documents
> l'accompagnant, sont destinés uniquement aux personnes identifiées
> et peuvent contenir des informations privilégiées, confidentielles
> ou ne pouvant être divulguées. Si vous avez reçu ce message par
> erreur, veuillez le détruire.
>
>     gj> This communication (and/or the attachments) is intended for
> named recipients only and may contain privileged or confidential
> information which is not to be disclosed. If you received this
> communication by mistake please destroy all copies.
>
>     gj> ______________________________________________
>     gj> ESS-help at stat.math.ethz.ch mailing list
>     gj> https://stat.ethz.ch/mailman/listinfo/ess-help
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help



Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés
uniquement aux personnes identifiées et peuvent contenir des informations
privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez
reçu ce message par erreur, veuillez le détruire.

This communication ( and/or the attachments ) is intended for named
recipients only and may contain privileged or confidential information
which is not to be disclosed. If you received this communication by mistake
please destroy all copies.




Faites bonne impression et imprimez seulement au besoin !
Think green before you print !

Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés uniquement aux personnes identifiées et peuvent contenir des informations privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message par erreur, veuillez le détruire.

This communication (and/or the attachments) is intended for named recipients only and may contain privileged or confidential information which is not to be disclosed. If you received this communication by mistake please destroy all copies.



More information about the ESS-help mailing list