hutcha.s@psu.ac.th
2005-Apr-20 07:11 UTC
[Rd] localeToCharset error for Thai locale (PR#7799)
Full_Name: Hutcha Sriplung Version: 2.1.0 OS: windows Submission from: (NULL) (202.12.74.9) In R-2.1.0, I found that 'example' function does not work properly and report an error message as shown below on a Windows machine (running r-devel release) but not on Linux.> example(attach)Error in switch(x[2], "1250" = return("ISO 8859-2"), "1251" = return("KOI8-U"), : argument is missing, with no default I tracked the source codes and finally found minor mistakes with Thai language management on Windows platform in 'localeToCharset' function. file: /R-2.1.0/src/library/utils/iconv.R line: 50 if (en %in% "th") <<-- Should be "tg"-tajik??? return("KOI8-T") "th" is for Thai (TIS-620; already defined on line 48-49). line: 53-56 "874" = return("TIS 620") <<-- Should be added??? A default return should also be stated??? Note:> Sys.getlocale("LC_CTYPE")[1] "Thai_Thailand.874" 'example' works fine on a Linux machine.
ripley@stats.ox.ac.uk
2005-Apr-20 08:15 UTC
[Rd] localeToCharset error for Thai locale (PR#7799)
Please try R-patched, where this is already fixed. On Wed, 20 Apr 2005 hutcha.s@psu.ac.th wrote:> Full_Name: Hutcha Sriplung > Version: 2.1.0 > OS: windows > Submission from: (NULL) (202.12.74.9) > > > In R-2.1.0, I found that 'example' function does not work properly and report an > error message as shown below on a Windows machine (running r-devel release) but > not on Linux. > >> example(attach) > Error in switch(x[2], "1250" = return("ISO 8859-2"), "1251" = return("KOI8-U"), > : argument is missing, with no default > > I tracked the source codes and finally found minor mistakes with Thai language > management on Windows platform in 'localeToCharset' function. > > file: /R-2.1.0/src/library/utils/iconv.R > line: 50 > if (en %in% "th") <<-- Should be "tg"-tajik??? > return("KOI8-T") > > "th" is for Thai (TIS-620; already defined on line 48-49). > > line: 53-56 > "874" = return("TIS 620") <<-- Should be added??? > A default return should also be stated??? > > Note: >> Sys.getlocale("LC_CTYPE") > [1] "Thai_Thailand.874" > > 'example' works fine on a Linux machine. > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595