1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2018 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<refentry id="fn_charsets_list">
<refmeta>
<refentrytitle>charsets_list</refentrytitle>
<refmiscinfo>localization</refmiscinfo>
</refmeta>
<refnamediv>
<refname>charsets_list</refname>
<refpurpose>List known character set names and aliases.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis id="fsyn_charsets_list">
<funcprototype id="fproto_charsets_list">
<funcdef>any <function>charsets_list</function></funcdef>
<paramdef>in <parameter>gen_res_set</parameter> integer</paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1 id="desc_charsets_list">
<title>Description</title>
<para>This function produces a list of all character set names and aliases
known to Virtuoso. The returned value is an <type>array</type>
of <type>string</type>s with a character set name as each element.
If the <parameter>gen_res_set</parameter> 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.</para>
</refsect1>
<refsect1 id="params_charsets_list"><title>Parameters</title>
<refsect2><title><parameter>gen_res_set</parameter></title>
<para><type>Integer</type> flag to determine whether to produce a result set: 0 means no, 1 means yes.</para></refsect2>
</refsect1>
<refsect1 id="ret_charsets_list"><title>Return Types</title>
<para>An <type>array</type> of <type>string</type>, optionally generates a result set of single varchar columns.</para></refsect1>
<refsect1 id="errors_charsets_list"><title>Errors</title>
<para>This function can generate the following errors:</para>
<errorcode>SR008</errorcode>
<errorcode>SR001</errorcode>
</refsect1>
<refsect1 id="examples_charsets_list"><title>Examples</title>
<example id="ex_charsets_list1"><title>List character sets as a result set</title>
<screen>SQL> charsets_list(1);
CS_NAME
VARCHAR
___________________________________________
437
819
850
855
866
874
999
CP1250
CP1251
CP1252
CP1257
CP437
....</screen>
<para>There are 132 predefined character sets in total that would be listed.</para>
</example>
<example id="ex_charsets_list0"><title>Get first 2 character set names/aliases</title>
<programlisting>....
x:= charsets_list (0);
y := aref (x, 0); -- will be '437'
y := aref (x, 1); -- will be '819'
....</programlisting>
</example>
</refsect1>
<refsect1 id="seealso_charsets_list"><title>See Also</title>
<para><link linkend="fn_charset_define"><function>charset_define()</function></link></para>
</refsect1>
</refentry>
|