[R] Fancy quotes on Windows
Duncan Murdoch
murdoch at stats.uwo.ca
Fri Nov 6 19:18:42 CET 2009
On 11/6/2009 11:30 AM, James W. MacDonald wrote:
>
> Duncan Murdoch wrote:
>> On 11/6/2009 10:40 AM, James W. MacDonald wrote:
>>> Hi,
>>>
>>> I don't use Windows as my primary OS anymore, so didn't notice this
>>> until recently. In R-2.10.0 under Windows useFancyQuotes is FALSE by
>>> default, but this doesn't seem to affect the rendering of (text) help
>>> pages.
>>>
>>> This is not a problem if I run via the Rgui or Rterm (via DOS prompt),
>>> as the help pages are rendered in a popup window that understands
>>> directional quotes. However, if I run under emacs/ESS, the help is
>>> rendered within emacs, which doesn't understand directional quotes, so
>>> any quoted text is surrounded by \221thetext\222, which is obviously
>>> difficult to read.
>>>
>>> Is there another setting that I am missing that affects the usage of
>>> directional quotes for the help pages?
>>
>> I don't see this. Are you sure you haven't got a typo somewhere?
>
> Pretty sure. I get the opposite:
>
> Loading required package: utils
> > options("useFancyQuotes")
> $useFancyQuotes
> [1] FALSE
>
> > ?mean
>
> This is at a DOS prompt. In the popup box I get
>
> If ‘trim’ is zero (the default), the arithmetic mean of the
> values in ‘x’ is computed, as a numeric or complex vector of
I think I saw this once, but have been unable to reproduce it since
then. I may have had useFancyQuotes=TRUE on that one occasion.
Since I can no longer reproduce this, and looking at the code shows no
reason it shouldn't be deterministic, I'm going to have to give up on it.
All I can suggest is that you should re-install R, preferably from the
2.10.0 patched version. It has a few bug fixes since the release, and
whatever was causing the problem for you may have gone away.
Duncan Murdoch
>
> Also, from ?sQuote:
>
> Where fancy quotes are used, you should be aware that they may not
> be rendered correctly as not all fonts include the requisite
> glyphs: for example some have directional single quotes but not
> directional double quotes. This is particularly troublesome in
> Windows ‘Command Prompt’ windows, which by default are set up
> to run in the so-called OEM codepage, which in most locales uses a
> different encoding from Windows. Further, if the codepage is
> changed (with ‘chcp.exe’, e.g. to 1252 in a Western European
> language), the default raster fonts do not support the directional
> quotes.
>
> To work around this, the default for
> ‘options("useFancyQuotes")’ is ‘FALSE’ on Windows except
> for the ‘Rgui’ console. There fancy quotes work with the
> default Courier New font and more elegantly with Lucida Console
> and standard the CJK fonts, but directional double quotes are
> missing in raster fonts such as Courier and FixedSys.
>
> Best,
>
> Jim
>
>
>
>>
>> When I run options("useFancyQuotes") in a new session, I see
>>
>> > options("useFancyQuotes")
>> $useFancyQuotes
>> [1] TRUE
>>
>> and when I ask for help, I see help pages that respect that choice, e.g.
>>
>> > ?mean
>>
>> gives ‘trim = 0’ in the description of x. If I set
>>
>> > options(useFancyQuotes=FALSE)
>> > ?mean
>>
>> I see 'trim = 0'.
>>
>> Maybe if there's no typo, it's emacs or ESS that's messing up somehow.
>>
>> Duncan Murdoch
>
More information about the R-help
mailing list