Top

Name

charsets_list — List known character set names and aliases.

Synopsis

any charsets_list ( in gen_res_set integer );
 

Description

This function produces a list of all character set names and aliases known to Virtuoso. The returned value is an array of string s with a character set name as each element. If the gen_res_set flag is 1, the function also produces a result set in which each row contains one varchar column with a name of a character set or alias.

Parameters

gen_res_set

Integer flag to determine whether to produce a result set: 0 means no, 1 means yes.

Return Types

An array of string , optionally generates a result set of single varchar columns.

Errors

This function can generate the following errors: SR008 SR001

Examples

Example 24.39. List character sets as a result set

SQL> charsets_list(1);
CS_NAME
VARCHAR
___________________________________________

437
819
850
855
866
874
999
CP1250
CP1251
CP1252
CP1257
CP437
....

There are 132 predefined character sets in total that would be listed.


Example 24.40. Get first 2 character set names/aliases

....
x:= charsets_list (0);
y := aref (x, 0); -- will be '437'
y := aref (x, 1); -- will be '819'
....