[Rd] localeToCharset error for Thai locale (PR#7799)

ripley at stats.ox.ac.uk ripley at stats.ox.ac.uk
Wed Apr 20 08:14:56 CEST 2005


Please try R-patched, where this is already fixed.

On Wed, 20 Apr 2005 hutcha.s at 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 at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>

-- 
Brian D. Ripley,                  ripley at 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



More information about the R-devel mailing list