Re: [Rd] Locale problems with too-fancy quotes in Windows CMD.exe

From: Martin Morgan <mtmorgan_at_fhcrc.org>
Date: Thu, 20 Sep 2007 12:28:53 -0700

Yes, sorry about the divination. FWIW I've seen another report of this (in passing, while addressing another issue) on the Bioconductor mailing list, and suspect that US users (and others?) will frequently be perplexed, perhaps spending significant time trying to track down how the 'wrong' data got into R.

Doing

c:\> chcp 1252
Active code page: 1252

Allows smart quotes to display correctly.

Thanks,

Martin

Prof Brian Ripley <ripley_at_stats.ox.ac.uk> writes:

> On Thu, 20 Sep 2007, Martin Morgan wrote:
>
>> 'Fancy' quotes are displayed incorrectly when running R from Windows'
>> CMD shell (Start -> Run -> CMD; latin small letter ae and capital
>> letter AE; as a script or interactively)). Is this a system
>> configuration issue, and if so how can I correct it?
>
> Yes, use chcp in the terminal or use options(fancyQuotes=FALSE) in R.
>
> Since you are I suppose (I am for some reason supposed to be able to
> divine, as you don't say and nor does your email address) in the USA,
> chcp 1252 is probably what you need. Ask Microsoft why it sets up
> terminals in a different codepage from the Windows' session running:
> it baffles many people.
>
>>
>> C:\R>Rscript -e sQuote('x')
>> [1] "x"
>>
>> C:\R>R --version
>> R version 2.6.0 beta (2007-09-20 r42920)
>> Copyright (C) 2007 The R Foundation for Statistical Computing
>> ISBN 3-900051-07-0
>>
>> Windows is XP 2002 SP2
>>
>
> --
> Brian D. Ripley, ripley_at_stats.ox.ac.uk
> Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
> University of Oxford, Tel: +44 1865 272861 (self)
> 1 South Parks Road, +44 1865 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595

-- 
Martin Morgan
Bioconductor / Computational Biology
http://bioconductor.org

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 20 Sep 2007 - 19:32:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Sep 2007 - 20:42:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.