Skip to content

Commit 5dad4a9

Browse files
author
smeyer
committed
update musl-specific comments
git-svn-id: https://svn.r-project.org/R/trunk@87713 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 700c703 commit 5dad4a9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/library/base/man/iconv.Rd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ iconvlist()
4646
Generally case is ignored when specifying an encoding.
4747

4848
On most platforms \code{iconvlist} provides an alphabetical list of
49-
the supported encodings. On others, the information is on the man
49+
the supported encodings (including aliases). On \samp{musl} (as used
50+
by Alpine Linux and other lightweight Linux distributions) the listing
51+
is incomplete. On others, the information is on the man
5052
page for \code{iconv(5)} or elsewhere in the man pages (but beware
5153
that the system command \code{iconv} may not support the same set of
5254
encodings as the C functions \R calls). Unfortunately, the names are
@@ -62,7 +64,7 @@ iconvlist()
6264

6365
Encoding \code{"ASCII"} is accepted, and on most systems \code{"C"}
6466
and \code{"POSIX"} are synonyms for ASCII. Where
65-
\code{"ASCII/TRANSLIT"} is unsupported by the OS, \code{"ASCII"} is
67+
\code{"ASCII//TRANSLIT"} is unsupported by the OS, \code{"ASCII"} is
6668
used with \code{sub = "c99"} if from UTF-8, else \code{sub =
6769
"?"}. (However, \I{musl}'s version of \code{"ASCII"} substitutes
6870
\code{*}.)
@@ -177,10 +179,8 @@ iconvlist()
177179
\note{
178180
The most portable name for the ISO 8859-15 encoding, commonly known as
179181
\sQuote{Latin 9}, is \code{"iso885915"}: most platforms support both
180-
\code{"latin-9"} and\code{"latin9"} but GNU \samp{libiconv} does not
181-
support the latter. \samp{musl} (as used by Alpine Linux and other
182-
lightweight Linux distributions) supports neither, but \R remaps there
183-
to \code{"iso885915"}.
182+
\code{"latin-9"} and \code{"latin9"} % (including \samp{musl})
183+
but GNU \samp{libiconv} does not support the latter.
184184
185185
Encoding names \code{"utf8"}, \code{"mac"} and \code{"macroman"} are
186186
not portable. \code{"utf8"} is converted to \code{"UTF-8"} for

src/main/sysutils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,7 @@ attribute_hidden SEXP do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
656656
from = "iso88592";
657657
if(R_strieql(to, "latin-2") || R_strieql(to, "latin2") )
658658
to = "iso88592";
659+
/* the following is redundant (musl does know about the latin9 alias) */
659660
if(R_strieql(from, "latin-9") || R_strieql(from, "latin9") )
660661
from = "iso885915";
661662
if(R_strieql(to, "latin-9") || R_strieql(to, "latin9") )

0 commit comments

Comments
 (0)