Hello, All: What would it take to make ?iconv? portable? I ask, because I want to convert accented characters to vanilla ASCII, thereby converting, e.g., ?Ra?l? to ?Raul?, and Milan Bouchet-Valet suggested on R-help that I use 'iconv(x, ?", "ASCII//TRANSLIT?)?. This worked under Windows but failed on Linux and Mac. It?s part of the ?subNonStandardCharacters? function in the Ecfun package. The development version on R-Forge uses this and returns ?Raul? under Windows and NA under Mac OS X (and presumably also Linux). The ?iconv? R code merely calls compiled code, which I?ve used very little in 30 years. Thanks, Spencer> On Nov 30, 2014, at 2:32 AM, Spencer Graves <spencer.graves at structuremonitoring.com <mailto:spencer.graves at structuremonitoring.com>> wrote: > > Wonderful. Thanks very much. Spencer > > > On 11/30/2014 2:25 AM, Milan Bouchet-Valat wrote:[[alternative HTML version deleted]]
>>>>> Spencer Graves writes:> Hello, All: > What would it take to make ?iconv? portable?> I ask, because I want to convert accented characters to > vanilla ASCII, thereby converting, e.g., ?Ra?l? to ?Raul?, and > Milan Bouchet-Valet suggested on R-help that I use 'iconv(x, > ?", "ASCII//TRANSLIT?)?. This worked under Windows but failed > on Linux and Mac. It?s part of the ?subNonStandardCharacters? > function in the Ecfun package. The development version on > R-Forge uses this and returns ?Raul? under Windows and NA > under Mac OS X (and presumably also Linux).Hmm. R> iconv("Ra?l", "", "ASCII//TRANSLIT") [1] "Raul" seems to work for me on Linux ... -k> The ?iconv? R code merely calls compiled code, which I?ve used very little in 30 years.> Thanks, > Spencer>> On Nov 30, 2014, at 2:32 AM, Spencer Graves <spencer.graves at structuremonitoring.com <mailto:spencer.graves at structuremonitoring.com>> wrote: >> >> Wonderful. Thanks very much. Spencer >> >> >> On 11/30/2014 2:25 AM, Milan Bouchet-Valat wrote:> [[alternative HTML version deleted]]> ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
> On Dec 15, 2014, at 12:21 PM, Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote: > >>>>>> Spencer Graves writes: > >> Hello, All: >> What would it take to make ?iconv? portable? > > >> I ask, because I want to convert accented characters to >> vanilla ASCII, thereby converting, e.g., ?Ra?l? to ?Raul?, and >> Milan Bouchet-Valet suggested on R-help that I use 'iconv(x, >> ?", "ASCII//TRANSLIT?)?. This worked under Windows but failed >> on Linux and Mac. It?s part of the ?subNonStandardCharacters? >> function in the Ecfun package. The development version on >> R-Forge uses this and returns ?Raul? under Windows and NA >> under Mac OS X (and presumably also Linux). > > Hmm. > > R> iconv("Ra?l", "", "ASCII//TRANSLIT") > [1] "Raul" > > seems to work for me on Linux ... >also on OS X:> iconv("Ra?l", "", "ASCII//TRANSLIT")[1] "Ra'ul"> -k > > >> The ?iconv? R code merely calls compiled code, which I?ve used very little in 30 years. > > >> Thanks, >> Spencer > > > >>> On Nov 30, 2014, at 2:32 AM, Spencer Graves <spencer.graves at structuremonitoring.com <mailto:spencer.graves at structuremonitoring.com>> wrote: >>> >>> Wonderful. Thanks very much. Spencer >>> >>> >>> On 11/30/2014 2:25 AM, Milan Bouchet-Valat wrote: > >> [[alternative HTML version deleted]] > >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
>>>>> Kurt Hornik <Kurt.Hornik at wu.ac.at> >>>>> on Mon, 15 Dec 2014 18:21:19 +0100 writes:>>>>> Spencer Graves writes:>> Hello, All: What would it take to make ?iconv? portable? >> I ask, because I want to convert accented characters to >> vanilla ASCII, thereby converting, e.g., ?Ra?l? to >> ?Raul?, and Milan Bouchet-Valet suggested on R-help that >> I use 'iconv(x, ?", "ASCII//TRANSLIT?)?. This worked >> under Windows but failed on Linux and Mac. It?s part of >> the ?subNonStandardCharacters? function in the Ecfun >> package. The development version on R-Forge uses this and >> returns ?Raul? under Windows and NA under Mac OS X (and >> presumably also Linux). > Hmm. R> iconv("Ra?l", "", "ASCII//TRANSLIT") > [1] "Raul" > seems to work for me on Linux ... and me:> iconv("Martin M?chler, Z?rich. ?Espa?a, Ol?!", "", "ASCII//TRANSLIT")[1] "Martin Maechler, Zuerich. ?Espana, Ole!" >> The ?iconv? R code merely calls compiled code, which I?ve >> used very little in 30 years. >> Thanks, Spencer >>> On Nov 30, 2014, at 2:32 AM, Spencer Graves >>> <spencer.graves at structuremonitoring.com >>> <mailto:spencer.graves at structuremonitoring.com>> wrote: >>> >>> Wonderful. Thanks very much. Spencer >>> >>> >>> On 11/30/2014 2:25 AM, Milan Bouchet-Valat wrote: >> [[alternative HTML version deleted]] >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel