Interested in improving this site? Please check the To Do page.
string.isCharsetAvailable
Determines if the specified character set is available in the operating system.
Syntax
string.isCharsetAvailabe( charsetName )
Params
charsetName is a string, the IANA-registered name of a character set like “iso-8859-1” or “macintosh”
Returns
A boolean: true if the character set is available, false otherwise.
Examples
string.isCharsetAvailable( "macintosh" )
true
string.isCharsetAvailable( "shift_jis" )
true
string.isCharsetAvailable( "windows" )
false
string.isCharsetAvailable( "windows-1252" )
true
Errors
None.
Notes
Many character sets have more than one name. The alternate names should work just as well as the canonical name. It just depends on the support provided by the underlying operating system.