Skip to content

Fancy quotes on Windows

7 messages · Duncan Murdoch, James W. MacDonald

#
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?

Thanks,

Jim
#
On 11/6/2009 10:40 AM, James W. MacDonald wrote:
I don't see this.  Are you sure you haven't got a typo somewhere?

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
#
Duncan Murdoch wrote:
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

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

  
    
#
On 11/6/2009 11:30 AM, James W. MacDonald wrote:
Sorry, I should have realized that since you're using ESS.  I was 
testing in Rgui.

I see it now; I'll take a look...

Duncan Murdoch
#
On 11/6/2009 11:39 AM, Duncan Murdoch wrote:
Now I don't see it.  Something funny is going on...

Duncan Murdoch
#
On 11/6/2009 11:30 AM, James W. MacDonald wrote:
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
#
Thanks Duncan, updating to R-patched was all I needed.

Best,

Jim
Duncan Murdoch wrote: