localeToCharset
Select a Suitable Encoding Name from a Locale Name

Description

Returns a suitable encoding name from a locale name.

Usage

localeToCharset(locale = Sys.getlocale("LC_CTYPE"))

Arguments

locale a character string specifying the locale name. The default is the current locale of LC_CTYPE.

Details

Use this function to get the suitable encoding name from a known locale name. For example, "UTF-8", "ISO8859-1", "GB2312", "EUC-JP" and "CP1255" are valid encoding names.
In TIBCO Enterprise Runtime for R, this function currently returns the single encoding "UTF-8" for all locales except for the locale "C", where it returns "ASCII".
Value
returns a character vector representing the known encoding names, or NA for unknown names.
Differences between TIBCO Enterprise Runtime for R and Open-source R
See Also
Sys.setlocale
Examples
Sys.setlocale(loc = "")
localeToCharset()

Sys.setlocale(cat = "LC_TIME", loc = "chinese") localeToCharset(loc = Sys.getlocale(cat="LC_TIME"))

Package utils version 6.0.0-69
Package Index