From deepayan at stat.wisc.edu  Wed Mar 16 16:18:53 2005
From: deepayan at stat.wisc.edu (Deepayan Sarkar)
Date: Wed Mar 16 16:17:57 2005
Subject: [Rd] minor iconvlist() bug in r-devel
Message-ID: <200503160918.53650.deepayan@stat.wisc.edu>


This is on r-devel from 2005-03-15. iconvlist() uses (at least some of 
the time)

icfile <- system.file("iconvlist", package = "utils")

which looks like 

"""
The following list contain all the coded character sets known.  This 
does not necessarily mean that all combinations of these names can be 
used for the FROM and TO command line parameters.  One coded character
set can be listed with several different names (aliases).

  437//
500//
.
.
.
"""

which leads to 

> tail(iconvlist(), n = 40)
 [1] "WS2"          "YU"           "all"          "all"          "and"
 [6] "be"           "be"           "can"          "can"      "character"
[11] "character"    "coded"        "coded"     "combinations" "command"
[16] "contain"      "different"    "does"         "following"    "for"
[21] "known."       "line"         "list"         "listed"       "mean"
[26] "names"        "names"        "necessarily"  "not"          "of"
[31] "parameters."  "set"          "sets"         "several"      "that"
[36] "the"          "the"          "these"        "used"         "with"

A possible fix seems to be to replace

    ext <- readLines(icfile)

by 

    ext <- grep("/$", readLines(icfile), value = TRUE)

but I don't know if that's guaranteed to work. 

-Deepayan


[Rd] minor iconvlist() bug in r-devel
Deepayan Sarkar