Home Explore Blog CI



postgresql

32th chunk of `doc/src/sgml/charset.sgml`
d26393d2f4123b7144458c62b25df24088684342ecd977600000000100000fb4
 client, and some
     Japanese characters are returned that do not have a representation in
     <literal>LATIN1</literal> &mdash; an error is reported.
    </para>

    <para>
     If the client character set is defined as <literal>SQL_ASCII</literal>,
     encoding conversion is disabled, regardless of the server's character
     set.  (However, if the server's character set is
     not <literal>SQL_ASCII</literal>, the server will still check that
     incoming data is valid for that encoding; so the net effect is as
     though the client character set were the same as the server's.)
     Just as for the server, use of <literal>SQL_ASCII</literal> is unwise
     unless you are working with all-ASCII data.
    </para>
   </sect2>

   <sect2 id="multibyte-conversions-supported">
    <title>Available Character Set Conversions</title>

    <para>
     <productname>PostgreSQL</productname> allows conversion between any
     two character sets for which a conversion function is listed in the
     <link linkend="catalog-pg-conversion"><structname>pg_conversion</structname></link>
     system catalog.  <productname>PostgreSQL</productname> comes with
     some predefined conversions, as summarized in
     <xref linkend="multibyte-translation-table"/> and shown in more
     detail in <xref linkend="builtin-conversions-table"/>.  You can
     create a new conversion using the SQL command
     <xref linkend="sql-createconversion"/>.  (To be used for automatic
     client/server conversions, a conversion must be marked
     as <quote>default</quote> for its character set pair.)
    </para>

    <table id="multibyte-translation-table">
     <title>Built-in Client/Server Character Set Conversions</title>
     <tgroup cols="2">
      <colspec colname="col1" colwidth="1*"/>
      <colspec colname="col2" colwidth="3*"/>
      <thead>
       <row>
        <entry>Server Character Set</entry>
        <entry>Available Client Character Sets</entry>
       </row>
      </thead>
      <tbody>
       <row>
        <entry><literal>BIG5</literal></entry>
        <entry><emphasis>not supported as a server encoding</emphasis>
        </entry>
       </row>
       <row>
        <entry><literal>EUC_CN</literal></entry>
        <entry><emphasis>EUC_CN</emphasis>,
        <literal>MULE_INTERNAL</literal>,
        <literal>UTF8</literal>
        </entry>
       </row>
       <row>
        <entry><literal>EUC_JP</literal></entry>
        <entry><emphasis>EUC_JP</emphasis>,
        <literal>MULE_INTERNAL</literal>,
        <literal>SJIS</literal>,
        <literal>UTF8</literal>
        </entry>
       </row>
       <row>
        <entry><literal>EUC_JIS_2004</literal></entry>
        <entry><emphasis>EUC_JIS_2004</emphasis>,
        <literal>SHIFT_JIS_2004</literal>,
        <literal>UTF8</literal>
        </entry>
       </row>
       <row>
        <entry><literal>EUC_KR</literal></entry>
        <entry><emphasis>EUC_KR</emphasis>,
        <literal>MULE_INTERNAL</literal>,
        <literal>UTF8</literal>
        </entry>
       </row>
       <row>
        <entry><literal>EUC_TW</literal></entry>
        <entry><emphasis>EUC_TW</emphasis>,
        <literal>BIG5</literal>,
        <literal>MULE_INTERNAL</literal>,
        <literal>UTF8</literal>
        </entry>
       </row>
       <row>
        <entry><literal>GB18030</literal></entry>
        <entry><emphasis>not supported as a server encoding</emphasis>
        </entry>
       </row>
       <row>
        <entry><literal>GBK</literal></entry>
        <entry><emphasis>not supported as a server encoding</emphasis>
        </entry>
       </row>
       <row>
        <entry><literal>ISO_8859_5</literal></entry>
        <entry><emphasis>ISO_8859_5</emphasis>,
        <literal>KOI8R</literal>,
        <literal>MULE_INTERNAL</literal>,
        <literal>UTF8</literal>,
        <literal>WIN866</literal>,
        <literal>WIN1251</literal>
        </entry>
       </row>
       <row>
        <entry><literal>ISO_8859_6</literal></entry>

Title: Character Set Conversions in PostgreSQL
Summary
PostgreSQL supports various character set conversions between server and client, with some conversions predefined and others creatable using the SQL command, and the available conversions are listed in a system catalog, with considerations for default conversions and supported character sets.