Skip to content

Commit

Permalink
update musl-specific comments
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@87713 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
smeyer committed Feb 11, 2025
1 parent 700c703 commit 5dad4a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/library/base/man/iconv.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ iconvlist()
Generally case is ignored when specifying an encoding.

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

Encoding \code{"ASCII"} is accepted, and on most systems \code{"C"}
and \code{"POSIX"} are synonyms for ASCII. Where
\code{"ASCII/TRANSLIT"} is unsupported by the OS, \code{"ASCII"} is
\code{"ASCII//TRANSLIT"} is unsupported by the OS, \code{"ASCII"} is
used with \code{sub = "c99"} if from UTF-8, else \code{sub =
"?"}. (However, \I{musl}'s version of \code{"ASCII"} substitutes
\code{*}.)
Expand Down Expand Up @@ -177,10 +179,8 @@ iconvlist()
\note{
The most portable name for the ISO 8859-15 encoding, commonly known as
\sQuote{Latin 9}, is \code{"iso885915"}: most platforms support both
\code{"latin-9"} and\code{"latin9"} but GNU \samp{libiconv} does not
support the latter. \samp{musl} (as used by Alpine Linux and other
lightweight Linux distributions) supports neither, but \R remaps there
to \code{"iso885915"}.
\code{"latin-9"} and \code{"latin9"} % (including \samp{musl})
but GNU \samp{libiconv} does not support the latter.
Encoding names \code{"utf8"}, \code{"mac"} and \code{"macroman"} are
not portable. \code{"utf8"} is converted to \code{"UTF-8"} for
Expand Down
1 change: 1 addition & 0 deletions src/main/sysutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ attribute_hidden SEXP do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
from = "iso88592";
if(R_strieql(to, "latin-2") || R_strieql(to, "latin2") )
to = "iso88592";
/* the following is redundant (musl does know about the latin9 alias) */
if(R_strieql(from, "latin-9") || R_strieql(from, "latin9") )
from = "iso885915";
if(R_strieql(to, "latin-9") || R_strieql(to, "latin9") )
Expand Down

0 comments on commit 5dad4a9

Please sign in to comment.