<?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.6 $ --> <!-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 --> <refentry id="function.mysql-client-encoding"> <refnamediv> <refname>mysql_client_encoding</refname> <refpurpose>Returns the name of the character set</refpurpose> </refnamediv> <refsect1> <title>Description</title> <methodsynopsis> <type>string</type><methodname>mysql_client_encoding</methodname> <methodparam choice="opt"><type>resource</type><parameter>link_identifier</parameter></methodparam> </methodsynopsis> <para> <function>mysql_client_encoding</function> returns the default character set name for the current connection. </para> <para> <example> <title><function>mysql_client_encoding</function> example</title> <programlisting role="php"> <![CDATA[ <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); $charset = mysql_client_encoding($link); printf("current character set is %s\n", $charset); ?> ]]> </programlisting> <para> The above example would produce the following output: </para> <screen> <![CDATA[ current character set is latin1 ]]> </screen> </example> </para> <para> See also <function>mysql_real_escape_string</function> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->