Thread: Re: [HACKERS] UTF8 or Unicode
Peter Eisentraut wrote: > Am Freitag, 25. Februar 2005 05:51 schrieb Bruce Momjian: > > so I see what he is saying. We are not consistent in favoring the > > official names vs. the common names. > > > > I will work on a patch that people can review and test. > > I think this is what we should do: > > UNICODE => UTF8 > ALT => WIN866 > WIN => WIN1251 > TCVN => WIN1258 > > That should clear it up. OK, here is a patch that makes those changes. The only uncertainty I have is with the the use of the TCVN conversion routine names, e.g.: SELECT CONVERT('foo' USING tcvn_to_utf_8); I assume this is the same as: SELECT CONVERT('foo', 'WIN1258', 'UTF8'); and SELECT CONVERT('foo', 'TCVN', 'UTF8'); -- alias usage So, why would people use the routine name? Both forms are documented. The first one with USING does not accept aliases, while the others do. I think this should be renamed to win1258_to_utf_8. However, this would be an incompatibility. We should mention it in the release notes. Other than that the other conversion files were already named fine, e.g. ascii_to_utf_8 (no UNICODE), however it is utf_8 and not utf8. I am unsure how to handle these. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: doc/src/sgml/charset.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v retrieving revision 2.48 diff -c -c -r2.48 charset.sgml *** doc/src/sgml/charset.sgml 4 Jan 2005 00:05:44 -0000 2.48 --- doc/src/sgml/charset.sgml 26 Feb 2005 20:46:03 -0000 *************** *** 285,291 **** allows you to store text in a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as <acronym>EUC</> (Extended Unix ! Code), Unicode, and Mule internal code. All character sets can be used transparently throughout the server. (If you use extension functions from other sources, it depends on whether they wrote their code correctly.) The default character set is selected while --- 285,291 ---- allows you to store text in a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as <acronym>EUC</> (Extended Unix ! Code), UTF8, and Mule internal code. All character sets can be used transparently throughout the server. (If you use extension functions from other sources, it depends on whether they wrote their code correctly.) The default character set is selected while *************** *** 339,346 **** <entry>Taiwan <acronym>EUC</acronym></entry> </row> <row> ! <entry><literal>UNICODE</literal></entry> ! <entry>Unicode (<acronym>UTF</acronym>-8)</entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> --- 339,346 ---- <entry>Taiwan <acronym>EUC</acronym></entry> </row> <row> ! <entry><literal>UTF8</literal></entry> ! <entry>UTF8 (Unicode, 8-bit)</entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> *************** *** 407,413 **** <entry><acronym>KOI</acronym>8-R(U)</entry> </row> <row> ! <entry><literal>ALT</literal></entry> <entry>Windows CP866</entry> </row> <row> --- 407,413 ---- <entry><acronym>KOI</acronym>8-R(U)</entry> </row> <row> ! <entry><literal>WIN866</literal></entry> <entry>Windows CP866</entry> </row> <row> *************** *** 419,425 **** <entry>Windows CP1250</entry> </row> <row> ! <entry><literal>WIN</literal></entry> <entry>Windows CP1251</entry> </row> <row> --- 419,425 ---- <entry>Windows CP1250</entry> </row> <row> ! <entry><literal>WIN1251</literal></entry> <entry>Windows CP1251</entry> </row> <row> *************** *** 427,434 **** <entry>Windows CP1256 (Arabic)</entry> </row> <row> ! <entry><literal>TCVN</literal></entry> ! <entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry> </row> </tbody> </tgroup> --- 427,434 ---- <entry>Windows CP1256 (Arabic)</entry> </row> <row> ! <entry><literal>WIN1258</literal></entry> ! <entry>Windows CP1258 (Vietnamese)/<acronym>TCVN</>-5712</entry> </row> </tbody> </tgroup> *************** *** 504,510 **** regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP ! unicode | t-ishii | UNICODE (9 rows) </screen> </para> --- 504,510 ---- regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP ! utf8 | t-ishii | UTF8 (9 rows) </screen> </para> *************** *** 561,686 **** <tbody> <row> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>SQL_ASCII</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_JP</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>EUC_CN</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>EUC_KR</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>JOHAB</literal></entry> ! <entry><literal>JOHAB</literal>, <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>EUC_TW</literal></entry> <entry><literal>EUC_TW</literal>, <literal>BIG5</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN1</literal></entry> ! <entry><literal>LATIN1</literal>, <literal>UNICODE</literal> <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN3</literal></entry> ! <entry><literal>LATIN3</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN4</literal></entry> ! <entry><literal>LATIN4</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN5</literal></entry> ! <entry><literal>LATIN5</literal>, <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>LATIN6</literal></entry> ! <entry><literal>LATIN6</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN7</literal></entry> ! <entry><literal>LATIN7</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN8</literal></entry> ! <entry><literal>LATIN8</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN9</literal></entry> ! <entry><literal>LATIN9</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN10</literal></entry> ! <entry><literal>LATIN10</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> <entry><literal>ISO_8859_5</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>, ! <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal> </entry> </row> <row> <entry><literal>ISO_8859_6</literal></entry> <entry><literal>ISO_8859_6</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>ISO_8859_7</literal></entry> <entry><literal>ISO_8859_7</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>ISO_8859_8</literal></entry> <entry><literal>ISO_8859_8</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> ! <entry><literal>UNICODE</literal></entry> <entry> <literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>, --- 561,686 ---- <tbody> <row> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>SQL_ASCII</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_JP</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>EUC_CN</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>EUC_KR</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>JOHAB</literal></entry> ! <entry><literal>JOHAB</literal>, <literal>UTF8</literal> </entry> </row> <row> <entry><literal>EUC_TW</literal></entry> <entry><literal>EUC_TW</literal>, <literal>BIG5</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN1</literal></entry> ! <entry><literal>LATIN1</literal>, <literal>UTF8</literal> <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN3</literal></entry> ! <entry><literal>LATIN3</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN4</literal></entry> ! <entry><literal>LATIN4</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN5</literal></entry> ! <entry><literal>LATIN5</literal>, <literal>UTF8</literal> </entry> </row> <row> <entry><literal>LATIN6</literal></entry> ! <entry><literal>LATIN6</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN7</literal></entry> ! <entry><literal>LATIN7</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN8</literal></entry> ! <entry><literal>LATIN8</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN9</literal></entry> ! <entry><literal>LATIN9</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN10</literal></entry> ! <entry><literal>LATIN10</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> <entry><literal>ISO_8859_5</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal>, ! <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal> </entry> </row> <row> <entry><literal>ISO_8859_6</literal></entry> <entry><literal>ISO_8859_6</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>ISO_8859_7</literal></entry> <entry><literal>ISO_8859_7</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>ISO_8859_8</literal></entry> <entry><literal>ISO_8859_8</literal>, ! <literal>UTF8</literal> </entry> </row> <row> ! <entry><literal>UTF8</literal></entry> <entry> <literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>, *************** *** 691,700 **** <literal>ISO_8859_6</literal>, <literal>ISO_8859_7</literal>, <literal>ISO_8859_8</literal>, ! <literal>WIN</literal>, <literal>ALT</literal>, <literal>KOI8</literal>, <literal>WIN1256</literal>, ! <literal>TCVN</literal>, <literal>WIN874</literal>, <literal>GB18030</literal>, <literal>WIN1250</literal> --- 691,700 ---- <literal>ISO_8859_6</literal>, <literal>ISO_8859_7</literal>, <literal>ISO_8859_8</literal>, ! <literal>WIN1251</literal>, <literal>WIN866</literal>, <literal>KOI8</literal>, <literal>WIN1256</literal>, ! <literal>WIN1258</literal>, <literal>WIN874</literal>, <literal>GB18030</literal>, <literal>WIN1250</literal> *************** *** 704,756 **** <entry><literal>MULE_INTERNAL</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>, <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>, ! <literal>WIN</literal>, <literal>ALT</literal>, <literal>WIN1250</literal>, <literal>BIG5</literal>, <literal>ISO_8859_5</literal>, <literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>ALT</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>WIN1250</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> ! <entry><literal>TCVN</literal></entry> ! <entry><literal>TCVN</literal>, ! <literal>UNICODE</literal> </entry> </row> </tbody> --- 704,756 ---- <entry><literal>MULE_INTERNAL</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>, <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>, ! <literal>WIN1251</literal>, <literal>WIN866</literal>, <literal>WIN1250</literal>, <literal>BIG5</literal>, <literal>ISO_8859_5</literal>, <literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN866</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>WIN1250</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal>, ! <literal>UTF8</literal> </entry> </row> <row> ! <entry><literal>WIN1258</literal></entry> ! <entry><literal>WIN1258</literal>, ! <literal>UTF8</literal> </entry> </row> </tbody> Index: doc/src/sgml/func.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.238 diff -c -c -r1.238 func.sgml *** doc/src/sgml/func.sgml 11 Feb 2005 04:31:54 -0000 1.238 --- doc/src/sgml/func.sgml 26 Feb 2005 20:46:11 -0000 *************** *** 934,940 **** names. </entry> <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf_8)</literal></entry> ! <entry><literal>'PostgreSQL'</literal> in Unicode (UTF-8) encoding</entry> </row> <row> --- 934,940 ---- names. </entry> <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf_8)</literal></entry> ! <entry><literal>'PostgreSQL'</literal> in UTF8 (Unicode, 8-bit) encoding</entry> </row> <row> *************** *** 1105,1112 **** <parameter>src_encoding</parameter> is omitted, database encoding is assumed. </entry> ! <entry><literal>convert( 'text_in_unicode', 'UNICODE', 'LATIN1')</literal></entry> ! <entry><literal>text_in_unicode</literal> represented in ISO 8859-1 encoding</entry> </row> <row> --- 1105,1112 ---- <parameter>src_encoding</parameter> is omitted, database encoding is assumed. </entry> ! <entry><literal>convert( 'text_in_utf8', 'UTF8', 'LATIN1')</literal></entry> ! <entry><literal>text_in_utf8</literal> represented in ISO 8859-1 encoding</entry> </row> <row> *************** *** 1423,1429 **** <row> <entry><literal>ascii_to_utf_8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1423,1429 ---- <row> <entry><literal>ascii_to_utf_8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1441,1447 **** <row> <entry><literal>big5_to_utf_8</literal></entry> <entry><literal>BIG5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1441,1447 ---- <row> <entry><literal>big5_to_utf_8</literal></entry> <entry><literal>BIG5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1453,1459 **** <row> <entry><literal>euc_cn_to_utf_8</literal></entry> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1453,1459 ---- <row> <entry><literal>euc_cn_to_utf_8</literal></entry> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1471,1477 **** <row> <entry><literal>euc_jp_to_utf_8</literal></entry> <entry><literal>EUC_JP</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1471,1477 ---- <row> <entry><literal>euc_jp_to_utf_8</literal></entry> <entry><literal>EUC_JP</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1483,1489 **** <row> <entry><literal>euc_kr_to_utf_8</literal></entry> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1483,1489 ---- <row> <entry><literal>euc_kr_to_utf_8</literal></entry> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1501,1549 **** <row> <entry><literal>euc_tw_to_utf_8</literal></entry> <entry><literal>EUC_TW</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>gb18030_to_utf_8</literal></entry> <entry><literal>GB18030</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>gbk_to_utf_8</literal></entry> <entry><literal>GBK</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_10_to_utf_8</literal></entry> <entry><literal>LATIN6</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_13_to_utf_8</literal></entry> <entry><literal>LATIN7</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_14_to_utf_8</literal></entry> <entry><literal>LATIN8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_15_to_utf_8</literal></entry> <entry><literal>LATIN9</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_16_to_utf_8</literal></entry> <entry><literal>LATIN10</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1501,1549 ---- <row> <entry><literal>euc_tw_to_utf_8</literal></entry> <entry><literal>EUC_TW</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>gb18030_to_utf_8</literal></entry> <entry><literal>GB18030</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>gbk_to_utf_8</literal></entry> <entry><literal>GBK</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_10_to_utf_8</literal></entry> <entry><literal>LATIN6</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_13_to_utf_8</literal></entry> <entry><literal>LATIN7</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_14_to_utf_8</literal></entry> <entry><literal>LATIN8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_15_to_utf_8</literal></entry> <entry><literal>LATIN9</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_16_to_utf_8</literal></entry> <entry><literal>LATIN10</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1555,1561 **** <row> <entry><literal>iso_8859_1_to_utf_8</literal></entry> <entry><literal>LATIN1</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1555,1561 ---- <row> <entry><literal>iso_8859_1_to_utf_8</literal></entry> <entry><literal>LATIN1</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1567,1573 **** <row> <entry><literal>iso_8859_2_to_utf_8</literal></entry> <entry><literal>LATIN2</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1567,1573 ---- <row> <entry><literal>iso_8859_2_to_utf_8</literal></entry> <entry><literal>LATIN2</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1585,1591 **** <row> <entry><literal>iso_8859_3_to_utf_8</literal></entry> <entry><literal>LATIN3</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1585,1591 ---- <row> <entry><literal>iso_8859_3_to_utf_8</literal></entry> <entry><literal>LATIN3</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1597,1603 **** <row> <entry><literal>iso_8859_4_to_utf_8</literal></entry> <entry><literal>LATIN4</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1597,1603 ---- <row> <entry><literal>iso_8859_4_to_utf_8</literal></entry> <entry><literal>LATIN4</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1615,1663 **** <row> <entry><literal>iso_8859_5_to_utf_8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>iso_8859_6_to_utf_8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_7_to_utf_8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_8_to_utf_8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_9_to_utf_8</literal></entry> <entry><literal>LATIN5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>johab_to_utf_8</literal></entry> <entry><literal>JOHAB</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1615,1663 ---- <row> <entry><literal>iso_8859_5_to_utf_8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> <entry><literal>iso_8859_6_to_utf_8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_7_to_utf_8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_8_to_utf_8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_9_to_utf_8</literal></entry> <entry><literal>LATIN5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>johab_to_utf_8</literal></entry> <entry><literal>JOHAB</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1675,1693 **** <row> <entry><literal>koi8_r_to_utf_8</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_1251</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_866</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> --- 1675,1693 ---- <row> <entry><literal>koi8_r_to_utf_8</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_1251</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_866</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> *************** *** 1777,1789 **** <row> <entry><literal>mic_to_windows_1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>mic_to_windows_866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> --- 1777,1789 ---- <row> <entry><literal>mic_to_windows_1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>mic_to_windows_866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> *************** *** 1801,2010 **** <row> <entry><literal>sjis_to_utf_8</literal></entry> <entry><literal>SJIS</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>tcvn_to_utf_8</literal></entry> ! <entry><literal>TCVN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>uhc_to_utf_8</literal></entry> <entry><literal>UHC</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>utf_8_to_ascii</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>SQL_ASCII</literal></entry> </row> <row> <entry><literal>utf_8_to_big5</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>BIG5</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_cn</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_CN</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_jp</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_JP</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_kr</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_KR</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_tw</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_TW</literal></entry> </row> <row> <entry><literal>utf_8_to_gb18030</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>GB18030</literal></entry> </row> <row> <entry><literal>utf_8_to_gbk</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>GBK</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_1</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN1</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_10</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_13</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_14</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_15</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN9</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_16</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN10</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_2</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN2</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_3</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN3</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_4</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN4</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_5</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_6</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_7</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_8</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_9</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN5</literal></entry> </row> <row> <entry><literal>utf_8_to_johab</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>JOHAB</literal></entry> </row> <row> <entry><literal>utf_8_to_koi8_r</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>utf_8_to_sjis</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>SJIS</literal></entry> </row> <row> <entry><literal>utf_8_to_tcvn</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>TCVN</literal></entry> </row> <row> <entry><literal>utf_8_to_uhc</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>UHC</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1250</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN1250</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1251</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1256</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN1256</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_866</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_874</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN874</literal></entry> </row> --- 1801,2010 ---- <row> <entry><literal>sjis_to_utf_8</literal></entry> <entry><literal>SJIS</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>tcvn_to_utf_8</literal></entry> ! <entry><literal>WIN1258</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>uhc_to_utf_8</literal></entry> <entry><literal>UHC</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>utf_8_to_ascii</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> </row> <row> <entry><literal>utf_8_to_big5</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>BIG5</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_cn</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_CN</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_jp</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_JP</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_kr</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_KR</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_tw</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_TW</literal></entry> </row> <row> <entry><literal>utf_8_to_gb18030</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>GB18030</literal></entry> </row> <row> <entry><literal>utf_8_to_gbk</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>GBK</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_1</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN1</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_10</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_13</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_14</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_15</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN9</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_16</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN10</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_2</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN2</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_3</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN3</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_4</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN4</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_5</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_6</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_7</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_8</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_9</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN5</literal></entry> </row> <row> <entry><literal>utf_8_to_johab</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>JOHAB</literal></entry> </row> <row> <entry><literal>utf_8_to_koi8_r</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>utf_8_to_sjis</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>SJIS</literal></entry> </row> <row> <entry><literal>utf_8_to_tcvn</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN1258</literal></entry> </row> <row> <entry><literal>utf_8_to_uhc</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>UHC</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1250</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN1250</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1251</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1256</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN1256</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_866</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_874</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN874</literal></entry> </row> *************** *** 2023,2101 **** <row> <entry><literal>windows_1250_to_utf_8</literal></entry> <entry><literal>WIN1250</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_1251_to_iso_8859_5</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_1251_to_koi8_r</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_1251_to_mic</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_1251_to_utf_8</literal></entry> ! <entry><literal>WIN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_1251_to_windows_866</literal></entry> ! <entry><literal>WIN</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>windows_1256_to_utf_8</literal></entry> <entry><literal>WIN1256</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_866_to_iso_8859_5</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_866_to_koi8_r</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_866_to_mic</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_866_to_utf_8</literal></entry> ! <entry><literal>ALT</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_866_to_windows_1251</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>windows_874_to_utf_8</literal></entry> <entry><literal>WIN874</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> </tbody> --- 2023,2101 ---- <row> <entry><literal>windows_1250_to_utf_8</literal></entry> <entry><literal>WIN1250</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_1251_to_iso_8859_5</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_1251_to_koi8_r</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_1251_to_mic</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_1251_to_utf_8</literal></entry> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_1251_to_windows_866</literal></entry> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> <entry><literal>windows_1256_to_utf_8</literal></entry> <entry><literal>WIN1256</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_866_to_iso_8859_5</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_866_to_koi8_r</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_866_to_mic</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_866_to_utf_8</literal></entry> ! <entry><literal>WIN866</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_866_to_windows_1251</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>windows_874_to_utf_8</literal></entry> <entry><literal>WIN874</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> </tbody> *************** *** 3372,3378 **** <row> <entry> <literal>\u</><replaceable>wxyz</> </entry> <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) ! the Unicode character <literal>U+</><replaceable>wxyz</> in the local byte ordering </entry> </row> --- 3372,3378 ---- <row> <entry> <literal>\u</><replaceable>wxyz</> </entry> <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) ! the UTF16 (Unicode, 16-bit) character <literal>U+</><replaceable>wxyz</> in the local byte ordering </entry> </row> Index: doc/src/sgml/ref/comment.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v retrieving revision 1.26 diff -c -c -r1.26 comment.sgml *** doc/src/sgml/ref/comment.sgml 4 Jan 2005 00:39:53 -0000 1.26 --- doc/src/sgml/ref/comment.sgml 26 Feb 2005 20:46:12 -0000 *************** *** 195,201 **** COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance'; COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4'; COMMENT ON COLUMN my_table.my_column IS 'Employee ID number'; ! COMMENT ON CONVERSION my_conv IS 'Conversion to Unicode'; COMMENT ON DATABASE my_database IS 'Development Database'; COMMENT ON DOMAIN my_domain IS 'Email Address Domain'; COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral'; --- 195,201 ---- COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance'; COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4'; COMMENT ON COLUMN my_table.my_column IS 'Employee ID number'; ! COMMENT ON CONVERSION my_conv IS 'Conversion to UTF8'; COMMENT ON DATABASE my_database IS 'Development Database'; COMMENT ON DOMAIN my_domain IS 'Email Address Domain'; COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral'; Index: doc/src/sgml/ref/create_conversion.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v retrieving revision 1.14 diff -c -c -r1.14 create_conversion.sgml *** doc/src/sgml/ref/create_conversion.sgml 29 Nov 2003 19:51:38 -0000 1.14 --- doc/src/sgml/ref/create_conversion.sgml 26 Feb 2005 20:46:12 -0000 *************** *** 136,145 **** <title>Examples</title> <para> ! To create a conversion from encoding <literal>UNICODE</literal> to <literal>LATIN1</literal> using <function>myfunc</>: <programlisting> ! CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc; </programlisting> </para> </refsect1> --- 136,145 ---- <title>Examples</title> <para> ! To create a conversion from encoding <literal>UTF8</literal> to <literal>LATIN1</literal> using <function>myfunc</>: <programlisting> ! CREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc; </programlisting> </para> </refsect1> Index: src/backend/utils/adt/selfuncs.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v retrieving revision 1.171 diff -c -c -r1.171 selfuncs.c *** src/backend/utils/adt/selfuncs.c 1 Feb 2005 23:07:58 -0000 1.171 --- src/backend/utils/adt/selfuncs.c 26 Feb 2005 20:46:15 -0000 *************** *** 4035,4041 **** * * NOTE: at present this assumes we are in the C locale, so that simple * bytewise comparison applies. However, we might be in a multibyte ! * encoding such as UTF-8, so we do have to watch out for generating * invalid encoding sequences. */ Const * --- 4035,4041 ---- * * NOTE: at present this assumes we are in the C locale, so that simple * bytewise comparison applies. However, we might be in a multibyte ! * encoding such as UTF8, so we do have to watch out for generating * invalid encoding sequences. */ Const * Index: src/backend/utils/mb/conv.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conv.c,v retrieving revision 1.51 diff -c -c -r1.51 conv.c *** src/backend/utils/mb/conv.c 31 Dec 2004 22:01:42 -0000 1.51 --- src/backend/utils/mb/conv.c 26 Feb 2005 20:46:15 -0000 *************** *** 303,309 **** /* * comparison routine for bsearch() ! * this routine is intended for UTF-8 -> local code */ static int compare1(const void *p1, const void *p2) --- 303,309 ---- /* * comparison routine for bsearch() ! * this routine is intended for UTF8 -> local code */ static int compare1(const void *p1, const void *p2) *************** *** 318,324 **** /* * comparison routine for bsearch() ! * this routine is intended for local code -> UTF-8 */ static int compare2(const void *p1, const void *p2) --- 318,324 ---- /* * comparison routine for bsearch() ! * this routine is intended for local code -> UTF8 */ static int compare2(const void *p1, const void *p2) *************** *** 332,340 **** } /* ! * UTF-8 ---> local code * ! * utf: input UTF-8 string. Its length is limited by "len" parameter * or a null terminator. * iso: pointer to the output. * map: the conversion map. --- 332,340 ---- } /* ! * UTF8 ---> local code * ! * utf: input UTF8 string. Its length is limited by "len" parameter * or a null terminator. * iso: pointer to the output. * map: the conversion map. *************** *** 373,379 **** { ereport(WARNING, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), ! errmsg("ignoring unconvertible UTF-8 character 0x%04x", iutf))); continue; } --- 373,379 ---- { ereport(WARNING, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), ! errmsg("ignoring unconvertible UTF8 character 0x%04x", iutf))); continue; } *************** *** 390,396 **** } /* ! * local code ---> UTF-8 */ void LocalToUtf(unsigned char *iso, unsigned char *utf, --- 390,396 ---- } /* ! * local code ---> UTF8 */ void LocalToUtf(unsigned char *iso, unsigned char *utf, Index: src/backend/utils/mb/encnames.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/encnames.c,v retrieving revision 1.22 diff -c -c -r1.22 encnames.c *** src/backend/utils/mb/encnames.c 4 Dec 2004 18:19:31 -0000 1.22 --- src/backend/utils/mb/encnames.c 26 Feb 2005 20:46:15 -0000 *************** *** 27,33 **** * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1 * are always converted to 'iso88591'. All must be lower case. * ! * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needful? * * Karel Zak, Aug 2001 * ---------- --- 27,33 ---- * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1 * are always converted to 'iso88591'. All must be lower case. * ! * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needed? * * Karel Zak, Aug 2001 * ---------- *************** *** 35,44 **** pg_encname pg_encname_tbl[] = { { ! "abc", PG_TCVN ! }, /* alias for TCVN */ { ! "alt", PG_ALT }, /* IBM866 */ { "big5", PG_BIG5 --- 35,44 ---- pg_encname pg_encname_tbl[] = { { ! "abc", PG_WIN1258 ! }, /* alias for WIN1258 */ { ! "alt", PG_WIN866 }, /* IBM866 */ { "big5", PG_BIG5 *************** *** 166,188 **** "sqlascii", PG_SQL_ASCII }, { ! "tcvn", PG_TCVN ! }, /* TCVN; Vietnamese TCVN-5712 */ { ! "tcvn5712", PG_TCVN ! }, /* alias for TCVN */ { "uhc", PG_UHC }, /* UHC; Korean Windows CodePage 949 */ { "unicode", PG_UTF8 ! }, /* alias for UTF-8 */ { "utf8", PG_UTF8 ! }, /* UTF-8; RFC2279 */ { ! "vscii", PG_TCVN ! }, /* alias for TCVN */ { "win", PG_WIN1251 }, /* _dirty_ alias for windows-1251 --- 166,191 ---- "sqlascii", PG_SQL_ASCII }, { ! "tcvn", PG_WIN1258 ! }, /* alias for WIN1258 */ { ! "tcvn5712", PG_WIN1258 ! }, /* alias for WIN1258 */ { "uhc", PG_UHC }, /* UHC; Korean Windows CodePage 949 */ { "unicode", PG_UTF8 ! }, /* alias for UTF8 */ ! { ! "utf-8", PG_UTF8 ! }, /* UTF8; RFC2279 */ { "utf8", PG_UTF8 ! }, /* alias for UTF8 */ { ! "vscii", PG_WIN1258 ! }, /* alias for WIN1258 */ { "win", PG_WIN1251 }, /* _dirty_ alias for windows-1251 *************** *** 197,205 **** "win1256", PG_WIN1256 }, /* alias for Windows-1256 */ { ! "win1258", PG_TCVN }, /* alias for Windows-1258 */ { "win874", PG_WIN874 }, /* alias for Windows-874 */ { --- 200,211 ---- "win1256", PG_WIN1256 }, /* alias for Windows-1256 */ { ! "win1258", PG_WIN1258 }, /* alias for Windows-1258 */ { + "win866", PG_WIN866 + }, /* IBM866 */ + { "win874", PG_WIN874 }, /* alias for Windows-874 */ { *************** *** 224,232 **** "windows1256", PG_WIN1256 }, /* Windows-1256; Microsoft */ { ! "windows1258", PG_TCVN }, /* Windows-1258; Microsoft */ { "windows874", PG_WIN874 }, /* Windows-874; Microsoft */ { --- 230,241 ---- "windows1256", PG_WIN1256 }, /* Windows-1256; Microsoft */ { ! "windows1258", PG_WIN1258 }, /* Windows-1258; Microsoft */ { + "windows866", PG_WIN866 + }, /* IBM866 */ + { "windows874", PG_WIN874 }, /* Windows-874; Microsoft */ { *************** *** 275,281 **** "JOHAB", PG_JOHAB }, { ! "UNICODE", PG_UTF8 }, { "MULE_INTERNAL", PG_MULE_INTERNAL --- 284,290 ---- "JOHAB", PG_JOHAB }, { ! "UTF8", PG_UTF8 }, { "MULE_INTERNAL", PG_MULE_INTERNAL *************** *** 314,332 **** "WIN1256", PG_WIN1256 }, { ! "TCVN", PG_TCVN }, { ! "WIN874", PG_WIN874 }, { ! "KOI8", PG_KOI8R }, { ! "WIN", PG_WIN1251 }, { ! "ALT", PG_ALT }, { "ISO_8859_5", PG_ISO_8859_5 --- 323,341 ---- "WIN1256", PG_WIN1256 }, { ! "WIN1258", PG_WIN1258 }, { ! "WIN866", PG_WIN866 }, { ! "WIN874", PG_WIN874 }, { ! "KOI8", PG_KOI8R }, { ! "WIN1251", PG_WIN1251 }, { "ISO_8859_5", PG_ISO_8859_5 Index: src/backend/utils/mb/mbutils.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v retrieving revision 1.48 diff -c -c -r1.48 mbutils.c *** src/backend/utils/mb/mbutils.c 13 Oct 2004 01:25:12 -0000 1.48 --- src/backend/utils/mb/mbutils.c 26 Feb 2005 20:46:15 -0000 *************** *** 222,228 **** * * XXX We assume that storage for converted result is 4-to-1 growth in * the worst case. The rate for currently supported encoding pares are within 3 ! * (SJIS JIS X0201 half width kanna -> UTF-8 is the worst case). * So "4" should be enough for the moment. */ unsigned char * --- 222,228 ---- * * XXX We assume that storage for converted result is 4-to-1 growth in * the worst case. The rate for currently supported encoding pares are within 3 ! * (SJIS JIS X0201 half width kanna -> UTF8 is the worst case). * So "4" should be enough for the moment. */ unsigned char * Index: src/backend/utils/mb/wchar.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/wchar.c,v retrieving revision 1.40 diff -c -c -r1.40 wchar.c *** src/backend/utils/mb/wchar.c 3 Dec 2004 01:20:20 -0000 1.40 --- src/backend/utils/mb/wchar.c 26 Feb 2005 20:46:15 -0000 *************** *** 344,350 **** } /* ! * convert UTF-8 string to pg_wchar (UCS-2) * caller should allocate enough space for "to" * len: length of from. * "from" not necessarily null terminated. --- 344,350 ---- } /* ! * convert UTF8 string to pg_wchar (UCS-2) * caller should allocate enough space for "to" * len: length of from. * "from" not necessarily null terminated. *************** *** 395,401 **** } /* ! * returns the byte length of a UTF-8 word pointed to by s */ int pg_utf_mblen(const unsigned char *s) --- 395,401 ---- } /* ! * returns the byte length of a UTF8 word pointed to by s */ int pg_utf_mblen(const unsigned char *s) *************** *** 822,828 **** while (len > 0 && *mbstr) { ! /* special UTF-8 check */ if (encoding == PG_UTF8 && (*mbstr & 0xf8) == 0xf0) { if (noError) --- 822,828 ---- while (len > 0 && *mbstr) { ! /* special UTF8 check */ if (encoding == PG_UTF8 && (*mbstr & 0xf8) == 0xf0) { if (noError) Index: src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c,v retrieving revision 1.9 diff -c -c -r1.9 cyrillic_and_mic.c *** src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c 31 Dec 2004 22:01:48 -0000 1.9 --- src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c 26 Feb 2005 20:46:16 -0000 *************** *** 182,188 **** unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL); Assert(len >= 0); --- 182,188 ---- unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL); Assert(len >= 0); *************** *** 199,205 **** int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_MULE_INTERNAL); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); mic2alt(src, dest, len); --- 199,205 ---- int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_MULE_INTERNAL); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); mic2alt(src, dest, len); *************** *** 256,262 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_KOI8R); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 256,262 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_KOI8R); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 275,281 **** int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_KOI8R); Assert(len >= 0); --- 275,281 ---- int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_KOI8R); Assert(len >= 0); *************** *** 295,301 **** int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_WIN1251); Assert(len >= 0); --- 295,301 ---- int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_WIN1251); Assert(len >= 0); *************** *** 316,322 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_WIN1251); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 316,322 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_WIN1251); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 416,422 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 416,422 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 435,441 **** int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5); Assert(len >= 0); --- 435,441 ---- int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5); Assert(len >= 0); Index: src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_ascii.c *** src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c 31 Dec 2004 22:02:11 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ASCII <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ASCII <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_big5.c *** src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c 31 Dec 2004 22:02:13 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * BIG5 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * BIG5 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_cyrillic.c *** src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c 31 Dec 2004 22:02:14 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c 26 Feb 2005 20:46:16 -0000 *************** *** 122,128 **** int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); UtfToLocal(src, dest, ULmap_ALT, --- 122,128 ---- int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); UtfToLocal(src, dest, ULmap_ALT, *************** *** 138,149 **** unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapALT, ! sizeof(LUmapALT) / sizeof(pg_local_to_utf), PG_ALT, len); PG_RETURN_VOID(); } --- 138,149 ---- unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapALT, ! sizeof(LUmapALT) / sizeof(pg_local_to_utf), PG_WIN866, len); PG_RETURN_VOID(); } Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_cn.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c 31 Dec 2004 22:02:16 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_CN <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_CN <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_jp.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c 31 Dec 2004 22:02:17 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_JP <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_JP <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_kr.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c 31 Dec 2004 22:02:19 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_KR <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_KR <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_tw.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c 31 Dec 2004 22:02:20 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_TW <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_TW <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_gb18030.c *** src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c 31 Dec 2004 22:02:23 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * GB18030 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * GB18030 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_gbk.c *** src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c 31 Dec 2004 22:02:26 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * GBK <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * GBK <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c,v retrieving revision 1.11 diff -c -c -r1.11 utf8_and_iso8859.c *** src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c 31 Dec 2004 22:02:27 -0000 1.11 --- src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ISO 8859 2-16 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ISO 8859 2-16 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 61,68 **** typedef struct { pg_enc encoding; ! pg_local_to_utf *map1; /* to UTF-8 map name */ ! pg_utf_to_local *map2; /* from UTF-8 map name */ int size1; /* size of map1 */ int size2; /* size of map2 */ } pg_conv_map; --- 61,68 ---- typedef struct { pg_enc encoding; ! pg_local_to_utf *map1; /* to UTF8 map name */ ! pg_utf_to_local *map2; /* from UTF8 map name */ int size1; /* size of map1 */ int size2; /* size of map2 */ } pg_conv_map; *************** *** 74,80 **** {PG_EUC_KR}, /* EUC for Korean */ {PG_EUC_TW}, /* EUC for Taiwan */ {PG_JOHAB}, /* EUC for Korean JOHAB */ ! {PG_UTF8}, /* Unicode UTF-8 */ {PG_MULE_INTERNAL}, /* Mule internal code */ {PG_LATIN1}, /* ISO-8859-1 Latin 1 */ {PG_LATIN2, LUmapISO8859_2, ULmapISO8859_2, --- 74,80 ---- {PG_EUC_KR}, /* EUC for Korean */ {PG_EUC_TW}, /* EUC for Taiwan */ {PG_JOHAB}, /* EUC for Korean JOHAB */ ! {PG_UTF8}, /* Unicode UTF8 */ {PG_MULE_INTERNAL}, /* Mule internal code */ {PG_LATIN1}, /* ISO-8859-1 Latin 1 */ {PG_LATIN2, LUmapISO8859_2, ULmapISO8859_2, *************** *** 105,115 **** sizeof(LUmapISO8859_16) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_16) / sizeof(pg_utf_to_local)}, /* ISO-8859-16 Latin 10 */ {PG_WIN1256}, /* windows-1256 */ ! {PG_TCVN}, /* TCVN (Windows-1258) */ {PG_WIN874}, /* windows-874 */ {PG_KOI8R}, /* KOI8-R */ {PG_WIN1251}, /* windows-1251 (was: WIN) */ ! {PG_ALT}, /* (MS-DOS CP866) */ {PG_ISO_8859_5, LUmapISO8859_5, ULmapISO8859_5, sizeof(LUmapISO8859_5) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_5) / sizeof(pg_utf_to_local)}, /* ISO-8859-5 */ --- 105,115 ---- sizeof(LUmapISO8859_16) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_16) / sizeof(pg_utf_to_local)}, /* ISO-8859-16 Latin 10 */ {PG_WIN1256}, /* windows-1256 */ ! {PG_WIN1258}, /* Windows-1258 */ {PG_WIN874}, /* windows-874 */ {PG_KOI8R}, /* KOI8-R */ {PG_WIN1251}, /* windows-1251 (was: WIN) */ ! {PG_WIN866}, /* (MS-DOS CP866) */ {PG_ISO_8859_5, LUmapISO8859_5, ULmapISO8859_5, sizeof(LUmapISO8859_5) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_5) / sizeof(pg_utf_to_local)}, /* ISO-8859-5 */ Index: src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v retrieving revision 1.10 diff -c -c -r1.10 utf8_and_iso8859_1.c *** src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 31 Dec 2004 22:02:29 -0000 1.10 --- src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ISO8859_1 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ISO8859_1 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 84,90 **** len -= 2; } else if ((c & 0xe0) == 0xe0) ! elog(ERROR, "could not convert UTF-8 character 0x%04x to ISO8859-1", c); else { --- 84,90 ---- len -= 2; } else if ((c & 0xe0) == 0xe0) ! elog(ERROR, "could not convert UTF8 character 0x%04x to ISO8859-1", c); else { Index: src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_johab.c *** src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 31 Dec 2004 22:02:31 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * JOHAB <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * JOHAB <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_sjis.c *** src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 31 Dec 2004 22:02:33 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * SJIS <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * SJIS <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_tcvn.c *** src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c 31 Dec 2004 22:02:35 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * TCVN <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * TCVN <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 40,51 **** unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_TCVN); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapTCVN, ! sizeof(LUmapTCVN) / sizeof(pg_local_to_utf), PG_TCVN, len); PG_RETURN_VOID(); } --- 40,51 ---- unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN1258); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapTCVN, ! sizeof(LUmapTCVN) / sizeof(pg_local_to_utf), PG_WIN1258, len); PG_RETURN_VOID(); } *************** *** 58,64 **** int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_TCVN); Assert(len >= 0); UtfToLocal(src, dest, ULmapTCVN, --- 58,64 ---- int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_WIN1258); Assert(len >= 0); UtfToLocal(src, dest, ULmapTCVN, Index: src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_uhc.c *** src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 31 Dec 2004 22:02:36 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 26 Feb 2005 20:46:16 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * UHC <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * UHC <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win1250.c *** src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c 31 Dec 2004 22:02:38 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c 26 Feb 2005 20:46:17 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN1250 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN1250 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win1256.c *** src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c 31 Dec 2004 22:02:39 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c 26 Feb 2005 20:46:17 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN1256 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN1256 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win874.c *** src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c 31 Dec 2004 22:02:41 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c 26 Feb 2005 20:46:17 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN874 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN874 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/bin/initdb/initdb.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/initdb/initdb.c,v retrieving revision 1.76 diff -c -c -r1.76 initdb.c *** src/bin/initdb/initdb.c 26 Feb 2005 18:43:34 -0000 1.76 --- src/bin/initdb/initdb.c 26 Feb 2005 20:46:18 -0000 *************** *** 723,729 **** {PG_JOHAB, "???"}, #endif ! {PG_UTF8, "UTF-8"}, {PG_UTF8, "utf8"}, {PG_LATIN1, "ISO-8859-1"}, --- 723,729 ---- {PG_JOHAB, "???"}, #endif ! {PG_UTF8, "UTF8"}, {PG_UTF8, "utf8"}, {PG_LATIN1, "ISO-8859-1"}, *************** *** 767,779 **** {PG_LATIN10, "iso885916"}, {PG_WIN1256, "CP1256"}, ! {PG_TCVN, "CP1258"}, #ifdef NOT_VERIFIED {PG_WIN874, "???"}, #endif {PG_KOI8R, "KOI8-R"}, {PG_WIN1251, "CP1251"}, ! {PG_ALT, "CP866"}, {PG_ISO_8859_5, "ISO-8859-5"}, {PG_ISO_8859_5, "ISO8859-5"}, --- 767,779 ---- {PG_LATIN10, "iso885916"}, {PG_WIN1256, "CP1256"}, ! {PG_WIN1258, "CP1258"}, #ifdef NOT_VERIFIED {PG_WIN874, "???"}, #endif {PG_KOI8R, "KOI8-R"}, {PG_WIN1251, "CP1251"}, ! {PG_WIN866, "CP866"}, {PG_ISO_8859_5, "ISO-8859-5"}, {PG_ISO_8859_5, "ISO8859-5"}, Index: src/include/mb/pg_wchar.h =================================================================== RCS file: /cvsroot/pgsql/src/include/mb/pg_wchar.h,v retrieving revision 1.56 diff -c -c -r1.56 pg_wchar.h *** src/include/mb/pg_wchar.h 4 Dec 2004 18:19:33 -0000 1.56 --- src/include/mb/pg_wchar.h 26 Feb 2005 20:46:18 -0000 *************** *** 155,161 **** PG_EUC_KR, /* EUC for Korean */ PG_EUC_TW, /* EUC for Taiwan */ PG_JOHAB, /* EUC for Korean JOHAB */ ! PG_UTF8, /* Unicode UTF-8 */ PG_MULE_INTERNAL, /* Mule internal code */ PG_LATIN1, /* ISO-8859-1 Latin 1 */ PG_LATIN2, /* ISO-8859-2 Latin 2 */ --- 155,161 ---- PG_EUC_KR, /* EUC for Korean */ PG_EUC_TW, /* EUC for Taiwan */ PG_JOHAB, /* EUC for Korean JOHAB */ ! PG_UTF8, /* Unicode UTF8 */ PG_MULE_INTERNAL, /* Mule internal code */ PG_LATIN1, /* ISO-8859-1 Latin 1 */ PG_LATIN2, /* ISO-8859-2 Latin 2 */ *************** *** 168,178 **** PG_LATIN9, /* ISO-8859-15 Latin9 */ PG_LATIN10, /* ISO-8859-16 Latin10 */ PG_WIN1256, /* windows-1256 */ ! PG_TCVN, /* TCVN (Windows-1258) */ PG_WIN874, /* windows-874 */ PG_KOI8R, /* KOI8-R */ PG_WIN1251, /* windows-1251 (was: WIN) */ - PG_ALT, /* (MS-DOS CP866) */ PG_ISO_8859_5, /* ISO-8859-5 */ PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_7, /* ISO-8859-7 */ --- 168,178 ---- PG_LATIN9, /* ISO-8859-15 Latin9 */ PG_LATIN10, /* ISO-8859-16 Latin10 */ PG_WIN1256, /* windows-1256 */ ! PG_WIN1258, /* Windows-1258 */ ! PG_WIN866, /* (MS-DOS CP866) */ PG_WIN874, /* windows-874 */ PG_KOI8R, /* KOI8-R */ PG_WIN1251, /* windows-1251 (was: WIN) */ PG_ISO_8859_5, /* ISO-8859-5 */ PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_7, /* ISO-8859-7 */ *************** *** 263,283 **** extern pg_wchar_tbl pg_wchar_table[]; /* ! * UTF-8 to local code conversion map */ typedef struct { ! unsigned int utf; /* UTF-8 */ unsigned int code; /* local code */ } pg_utf_to_local; /* ! * local code to UTF-8 conversion map */ typedef struct { unsigned int code; /* local code */ ! unsigned int utf; /* UTF-8 */ } pg_local_to_utf; extern int pg_mb2wchar(const unsigned char *from, pg_wchar *to); --- 263,283 ---- extern pg_wchar_tbl pg_wchar_table[]; /* ! * UTF8 to local code conversion map */ typedef struct { ! unsigned int utf; /* UTF8 */ unsigned int code; /* local code */ } pg_utf_to_local; /* ! * local code to UTF8 conversion map */ typedef struct { unsigned int code; /* local code */ ! unsigned int utf; /* UTF8 */ } pg_local_to_utf; extern int pg_mb2wchar(const unsigned char *from, pg_wchar *to); Index: src/test/regress/expected/conversion.out =================================================================== RCS file: /cvsroot/pgsql/src/test/regress/expected/conversion.out,v retrieving revision 1.9 diff -c -c -r1.9 conversion.out *** src/test/regress/expected/conversion.out 21 Nov 2003 22:32:49 -0000 1.9 --- src/test/regress/expected/conversion.out 26 Feb 2005 20:46:19 -0000 *************** *** 3,23 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; ERROR: conversion "myconv" already exists -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; ! ERROR: default conversion for LATIN1 to UNICODE already exists -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; ERROR: conversion "myconv_bad" does not exist --- 3,23 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; ERROR: conversion "myconv" already exists -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; ! ERROR: default conversion for LATIN1 to UTF8 already exists -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; ERROR: conversion "myconv_bad" does not exist *************** *** 134,160 **** foo (1 row) ! -- ALT --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL'); convert --------- foo (1 row) ! -- MULE_INTERNAL --> ALT SELECT CONVERT('foo' USING mic_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT'); convert --------- foo --- 134,160 ---- foo (1 row) ! -- WIN866 --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'MULE_INTERNAL'); convert --------- foo (1 row) ! -- MULE_INTERNAL --> WIN866 SELECT CONVERT('foo' USING mic_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN866'); convert --------- foo *************** *** 186,238 **** foo (1 row) ! -- KOI8R --> ALT SELECT CONVERT('foo' USING koi8_r_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'ALT'); convert --------- foo (1 row) ! -- ALT --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'KOI8R'); convert --------- foo (1 row) ! -- ALT --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> ALT SELECT CONVERT('foo' USING windows_1251_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'ALT'); convert --------- foo --- 186,238 ---- foo (1 row) ! -- KOI8R --> WIN866 SELECT CONVERT('foo' USING koi8_r_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'KOI8R'); convert --------- foo (1 row) ! -- WIN866 --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> WIN866 SELECT CONVERT('foo' USING windows_1251_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'WIN866'); convert --------- foo *************** *** 290,316 **** foo (1 row) ! -- ISO-8859-5 --> ALT SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'ALT'); convert --------- foo (1 row) ! -- ALT --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'ISO-8859-5'); convert --------- foo --- 290,316 ---- foo (1 row) ! -- ISO-8859-5 --> WIN866 SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'ISO-8859-5'); convert --------- foo *************** *** 680,1512 **** foo (1 row) ! -- SQL_ASCII --> UNICODE SELECT CONVERT('foo' USING ascii_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SQL_ASCII', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'SQL_ASCII'); convert --------- foo (1 row) ! -- BIG5 --> UNICODE SELECT CONVERT('foo' USING big5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'BIG5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'BIG5'); convert --------- foo (1 row) ! -- UNICODE --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'KOI8R'); convert --------- foo (1 row) ! -- KOI8R --> UNICODE SELECT CONVERT('foo' USING koi8_r_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> UNICODE SELECT CONVERT('foo' USING windows_1251_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ALT SELECT CONVERT('foo' USING utf_8_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ALT'); convert --------- foo (1 row) ! -- ALT --> UNICODE SELECT CONVERT('foo' USING windows_866_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'UNICODE'); convert --------- foo (1 row) ! -- EUC_CN --> UNICODE SELECT CONVERT('foo' USING euc_cn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_CN', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_CN'); convert --------- foo (1 row) ! -- EUC_JP --> UNICODE SELECT CONVERT('foo' USING euc_jp_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_JP', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_JP'); convert --------- foo (1 row) ! -- EUC_KR --> UNICODE SELECT CONVERT('foo' USING euc_kr_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_KR', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_KR'); convert --------- foo (1 row) ! -- EUC_TW --> UNICODE SELECT CONVERT('foo' USING euc_tw_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_TW', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_TW'); convert --------- foo (1 row) ! -- GB18030 --> UNICODE SELECT CONVERT('foo' USING gb18030_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GB18030', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'GB18030'); convert --------- foo (1 row) ! -- GBK --> UNICODE SELECT CONVERT('foo' USING gbk_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GBK', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'GBK'); convert --------- foo (1 row) ! -- UNICODE --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN2'); convert --------- foo (1 row) ! -- LATIN2 --> UNICODE SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN2', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN3'); convert --------- foo (1 row) ! -- LATIN3 --> UNICODE SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN3', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN4'); convert --------- foo (1 row) ! -- LATIN4 --> UNICODE SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN4', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN5'); convert --------- foo (1 row) ! -- LATIN5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN6'); convert --------- foo (1 row) ! -- LATIN6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN6', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN7'); convert --------- foo (1 row) ! -- LATIN7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN7', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN8'); convert --------- foo (1 row) ! -- LATIN8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN8', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN9'); convert --------- foo (1 row) ! -- LATIN9 --> UNICODE SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN9', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN10'); convert --------- foo (1 row) ! -- LATIN10 --> UNICODE SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN10', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-5'); convert --------- foo (1 row) ! -- ISO-8859-5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-6'); convert --------- foo (1 row) ! -- ISO-8859-6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-6', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-7'); convert --------- foo (1 row) ! -- ISO-8859-7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-7', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-8'); convert --------- foo (1 row) ! -- ISO-8859-8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-8', 'UNICODE'); convert --------- foo (1 row) ! -- LATIN1 --> UNICODE SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN1', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN1'); convert --------- foo (1 row) ! -- JOHAB --> UNICODE SELECT CONVERT('foo' USING johab_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'JOHAB', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'JOHAB'); convert --------- foo (1 row) ! -- SJIS --> UNICODE SELECT CONVERT('foo' USING sjis_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SJIS', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'SJIS'); convert --------- foo (1 row) ! -- TCVN --> UNICODE SELECT CONVERT('foo' USING tcvn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'TCVN', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> TCVN SELECT CONVERT('foo' USING utf_8_to_tcvn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'TCVN'); convert --------- foo (1 row) ! -- UHC --> UNICODE SELECT CONVERT('foo' USING uhc_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UHC', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'UHC'); convert --------- foo (1 row) ! -- UNICODE --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1250'); convert --------- foo (1 row) ! -- WIN1250 --> UNICODE SELECT CONVERT('foo' USING windows_1250_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1250', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1256'); convert --------- foo (1 row) ! -- WIN1256 --> UNICODE SELECT CONVERT('foo' USING windows_1256_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1256', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN874'); convert --------- foo (1 row) ! -- WIN874 --> UNICODE SELECT CONVERT('foo' USING windows_874_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN874', 'UNICODE'); convert --------- foo --- 680,1512 ---- foo (1 row) ! -- SQL_ASCII --> UTF8 SELECT CONVERT('foo' USING ascii_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SQL_ASCII', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'SQL_ASCII'); convert --------- foo (1 row) ! -- BIG5 --> UTF8 SELECT CONVERT('foo' USING big5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'BIG5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'BIG5'); convert --------- foo (1 row) ! -- UTF8 --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'KOI8R'); convert --------- foo (1 row) ! -- KOI8R --> UTF8 SELECT CONVERT('foo' USING koi8_r_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> UTF8 SELECT CONVERT('foo' USING windows_1251_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN866 SELECT CONVERT('foo' USING utf_8_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> UTF8 SELECT CONVERT('foo' USING windows_866_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'UTF8'); convert --------- foo (1 row) ! -- EUC_CN --> UTF8 SELECT CONVERT('foo' USING euc_cn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_CN', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_CN'); convert --------- foo (1 row) ! -- EUC_JP --> UTF8 SELECT CONVERT('foo' USING euc_jp_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_JP', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_JP'); convert --------- foo (1 row) ! -- EUC_KR --> UTF8 SELECT CONVERT('foo' USING euc_kr_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_KR', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_KR'); convert --------- foo (1 row) ! -- EUC_TW --> UTF8 SELECT CONVERT('foo' USING euc_tw_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_TW', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_TW'); convert --------- foo (1 row) ! -- GB18030 --> UTF8 SELECT CONVERT('foo' USING gb18030_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GB18030', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'GB18030'); convert --------- foo (1 row) ! -- GBK --> UTF8 SELECT CONVERT('foo' USING gbk_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GBK', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'GBK'); convert --------- foo (1 row) ! -- UTF8 --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN2'); convert --------- foo (1 row) ! -- LATIN2 --> UTF8 SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN2', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN3'); convert --------- foo (1 row) ! -- LATIN3 --> UTF8 SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN3', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN4'); convert --------- foo (1 row) ! -- LATIN4 --> UTF8 SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN4', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN5'); convert --------- foo (1 row) ! -- LATIN5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN6'); convert --------- foo (1 row) ! -- LATIN6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN6', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN7'); convert --------- foo (1 row) ! -- LATIN7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN7', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN8'); convert --------- foo (1 row) ! -- LATIN8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN8', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN9'); convert --------- foo (1 row) ! -- LATIN9 --> UTF8 SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN9', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN10'); convert --------- foo (1 row) ! -- LATIN10 --> UTF8 SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN10', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-5'); convert --------- foo (1 row) ! -- ISO-8859-5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-6'); convert --------- foo (1 row) ! -- ISO-8859-6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-6', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-7'); convert --------- foo (1 row) ! -- ISO-8859-7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-7', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-8'); convert --------- foo (1 row) ! -- ISO-8859-8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-8', 'UTF8'); convert --------- foo (1 row) ! -- LATIN1 --> UTF8 SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN1', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN1'); convert --------- foo (1 row) ! -- JOHAB --> UTF8 SELECT CONVERT('foo' USING johab_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'JOHAB', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'JOHAB'); convert --------- foo (1 row) ! -- SJIS --> UTF8 SELECT CONVERT('foo' USING sjis_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SJIS', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'SJIS'); convert --------- foo (1 row) ! -- WIN1258 --> UTF8 SELECT CONVERT('foo' USING tcvn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1258', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1258 SELECT CONVERT('foo' USING utf_8_to_tcvn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1258'); convert --------- foo (1 row) ! -- UHC --> UTF8 SELECT CONVERT('foo' USING uhc_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UHC', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'UHC'); convert --------- foo (1 row) ! -- UTF8 --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1250'); convert --------- foo (1 row) ! -- WIN1250 --> UTF8 SELECT CONVERT('foo' USING windows_1250_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1250', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1256'); convert --------- foo (1 row) ! -- WIN1256 --> UTF8 SELECT CONVERT('foo' USING windows_1256_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1256', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN874'); convert --------- foo (1 row) ! -- WIN874 --> UTF8 SELECT CONVERT('foo' USING windows_874_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN874', 'UTF8'); convert --------- foo Index: src/test/regress/sql/conversion.sql =================================================================== RCS file: /cvsroot/pgsql/src/test/regress/sql/conversion.sql,v retrieving revision 1.6 diff -c -c -r1.6 conversion.sql *** src/test/regress/sql/conversion.sql 21 Nov 2003 22:32:49 -0000 1.6 --- src/test/regress/sql/conversion.sql 26 Feb 2005 20:46:20 -0000 *************** *** 3,21 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; COMMENT ON CONVERSION myconv IS 'bar'; --- 3,21 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; COMMENT ON CONVERSION myconv IS 'bar'; *************** *** 51,80 **** -- MULE_INTERNAL --> WIN1251 SELECT CONVERT('foo' USING mic_to_windows_1251); SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251'); ! -- ALT --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); ! SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL'); ! -- MULE_INTERNAL --> ALT SELECT CONVERT('foo' USING mic_to_windows_866); ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT'); -- KOI8R --> WIN1251 SELECT CONVERT('foo' USING koi8_r_to_windows_1251); SELECT CONVERT('foo', 'KOI8R', 'WIN1251'); -- WIN1251 --> KOI8R SELECT CONVERT('foo' USING windows_1251_to_koi8_r); SELECT CONVERT('foo', 'WIN1251', 'KOI8R'); ! -- KOI8R --> ALT SELECT CONVERT('foo' USING koi8_r_to_windows_866); ! SELECT CONVERT('foo', 'KOI8R', 'ALT'); ! -- ALT --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); ! SELECT CONVERT('foo', 'ALT', 'KOI8R'); ! -- ALT --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); ! SELECT CONVERT('foo', 'ALT', 'WIN1251'); ! -- WIN1251 --> ALT SELECT CONVERT('foo' USING windows_1251_to_windows_866); ! SELECT CONVERT('foo', 'WIN1251', 'ALT'); -- ISO-8859-5 --> KOI8R SELECT CONVERT('foo' USING iso_8859_5_to_koi8_r); SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R'); --- 51,80 ---- -- MULE_INTERNAL --> WIN1251 SELECT CONVERT('foo' USING mic_to_windows_1251); SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251'); ! -- WIN866 --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); ! SELECT CONVERT('foo', 'WIN866', 'MULE_INTERNAL'); ! -- MULE_INTERNAL --> WIN866 SELECT CONVERT('foo' USING mic_to_windows_866); ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN866'); -- KOI8R --> WIN1251 SELECT CONVERT('foo' USING koi8_r_to_windows_1251); SELECT CONVERT('foo', 'KOI8R', 'WIN1251'); -- WIN1251 --> KOI8R SELECT CONVERT('foo' USING windows_1251_to_koi8_r); SELECT CONVERT('foo', 'WIN1251', 'KOI8R'); ! -- KOI8R --> WIN866 SELECT CONVERT('foo' USING koi8_r_to_windows_866); ! SELECT CONVERT('foo', 'KOI8R', 'WIN866'); ! -- WIN866 --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); ! SELECT CONVERT('foo', 'WIN866', 'KOI8R'); ! -- WIN866 --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); ! SELECT CONVERT('foo', 'WIN866', 'WIN1251'); ! -- WIN1251 --> WIN866 SELECT CONVERT('foo' USING windows_1251_to_windows_866); ! SELECT CONVERT('foo', 'WIN1251', 'WIN866'); -- ISO-8859-5 --> KOI8R SELECT CONVERT('foo' USING iso_8859_5_to_koi8_r); SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R'); *************** *** 87,98 **** -- WIN1251 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_1251_to_iso_8859_5); SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5'); ! -- ISO-8859-5 --> ALT SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); ! SELECT CONVERT('foo', 'ISO-8859-5', 'ALT'); ! -- ALT --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); ! SELECT CONVERT('foo', 'ALT', 'ISO-8859-5'); -- EUC_CN --> MULE_INTERNAL SELECT CONVERT('foo' USING euc_cn_to_mic); SELECT CONVERT('foo', 'EUC_CN', 'MULE_INTERNAL'); --- 87,98 ---- -- WIN1251 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_1251_to_iso_8859_5); SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5'); ! -- ISO-8859-5 --> WIN866 SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); ! SELECT CONVERT('foo', 'ISO-8859-5', 'WIN866'); ! -- WIN866 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); ! SELECT CONVERT('foo', 'WIN866', 'ISO-8859-5'); -- EUC_CN --> MULE_INTERNAL SELECT CONVERT('foo' USING euc_cn_to_mic); SELECT CONVERT('foo', 'EUC_CN', 'MULE_INTERNAL'); *************** *** 177,374 **** -- MULE_INTERNAL --> LATIN4 SELECT CONVERT('foo' USING mic_to_iso_8859_4); SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN4'); ! -- SQL_ASCII --> UNICODE SELECT CONVERT('foo' USING ascii_to_utf_8); ! SELECT CONVERT('foo', 'SQL_ASCII', 'UNICODE'); ! -- UNICODE --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); ! SELECT CONVERT('foo', 'UNICODE', 'SQL_ASCII'); ! -- BIG5 --> UNICODE SELECT CONVERT('foo' USING big5_to_utf_8); ! SELECT CONVERT('foo', 'BIG5', 'UNICODE'); ! -- UNICODE --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); ! SELECT CONVERT('foo', 'UNICODE', 'BIG5'); ! -- UNICODE --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); ! SELECT CONVERT('foo', 'UNICODE', 'KOI8R'); ! -- KOI8R --> UNICODE SELECT CONVERT('foo' USING koi8_r_to_utf_8); ! SELECT CONVERT('foo', 'KOI8R', 'UNICODE'); ! -- UNICODE --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1251'); ! -- WIN1251 --> UNICODE SELECT CONVERT('foo' USING windows_1251_to_utf_8); ! SELECT CONVERT('foo', 'WIN1251', 'UNICODE'); ! -- UNICODE --> ALT SELECT CONVERT('foo' USING utf_8_to_windows_866); ! SELECT CONVERT('foo', 'UNICODE', 'ALT'); ! -- ALT --> UNICODE SELECT CONVERT('foo' USING windows_866_to_utf_8); ! SELECT CONVERT('foo', 'ALT', 'UNICODE'); ! -- EUC_CN --> UNICODE SELECT CONVERT('foo' USING euc_cn_to_utf_8); ! SELECT CONVERT('foo', 'EUC_CN', 'UNICODE'); ! -- UNICODE --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_CN'); ! -- EUC_JP --> UNICODE SELECT CONVERT('foo' USING euc_jp_to_utf_8); ! SELECT CONVERT('foo', 'EUC_JP', 'UNICODE'); ! -- UNICODE --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_JP'); ! -- EUC_KR --> UNICODE SELECT CONVERT('foo' USING euc_kr_to_utf_8); ! SELECT CONVERT('foo', 'EUC_KR', 'UNICODE'); ! -- UNICODE --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_KR'); ! -- EUC_TW --> UNICODE SELECT CONVERT('foo' USING euc_tw_to_utf_8); ! SELECT CONVERT('foo', 'EUC_TW', 'UNICODE'); ! -- UNICODE --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_TW'); ! -- GB18030 --> UNICODE SELECT CONVERT('foo' USING gb18030_to_utf_8); ! SELECT CONVERT('foo', 'GB18030', 'UNICODE'); ! -- UNICODE --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); ! SELECT CONVERT('foo', 'UNICODE', 'GB18030'); ! -- GBK --> UNICODE SELECT CONVERT('foo' USING gbk_to_utf_8); ! SELECT CONVERT('foo', 'GBK', 'UNICODE'); ! -- UNICODE --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); ! SELECT CONVERT('foo', 'UNICODE', 'GBK'); ! -- UNICODE --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN2'); ! -- LATIN2 --> UNICODE SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); ! SELECT CONVERT('foo', 'LATIN2', 'UNICODE'); ! -- UNICODE --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN3'); ! -- LATIN3 --> UNICODE SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); ! SELECT CONVERT('foo', 'LATIN3', 'UNICODE'); ! -- UNICODE --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN4'); ! -- LATIN4 --> UNICODE SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); ! SELECT CONVERT('foo', 'LATIN4', 'UNICODE'); ! -- UNICODE --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN5'); ! -- LATIN5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); ! SELECT CONVERT('foo', 'LATIN5', 'UNICODE'); ! -- UNICODE --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN6'); ! -- LATIN6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); ! SELECT CONVERT('foo', 'LATIN6', 'UNICODE'); ! -- UNICODE --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN7'); ! -- LATIN7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); ! SELECT CONVERT('foo', 'LATIN7', 'UNICODE'); ! -- UNICODE --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN8'); ! -- LATIN8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); ! SELECT CONVERT('foo', 'LATIN8', 'UNICODE'); ! -- UNICODE --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN9'); ! -- LATIN9 --> UNICODE SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); ! SELECT CONVERT('foo', 'LATIN9', 'UNICODE'); ! -- UNICODE --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN10'); ! -- LATIN10 --> UNICODE SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); ! SELECT CONVERT('foo', 'LATIN10', 'UNICODE'); ! -- UNICODE --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-5'); ! -- ISO-8859-5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-5', 'UNICODE'); ! -- UNICODE --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-6'); ! -- ISO-8859-6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-6', 'UNICODE'); ! -- UNICODE --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-7'); ! -- ISO-8859-7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-7', 'UNICODE'); ! -- UNICODE --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-8'); ! -- ISO-8859-8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-8', 'UNICODE'); ! -- LATIN1 --> UNICODE SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); ! SELECT CONVERT('foo', 'LATIN1', 'UNICODE'); ! -- UNICODE --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN1'); ! -- JOHAB --> UNICODE SELECT CONVERT('foo' USING johab_to_utf_8); ! SELECT CONVERT('foo', 'JOHAB', 'UNICODE'); ! -- UNICODE --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); ! SELECT CONVERT('foo', 'UNICODE', 'JOHAB'); ! -- SJIS --> UNICODE SELECT CONVERT('foo' USING sjis_to_utf_8); ! SELECT CONVERT('foo', 'SJIS', 'UNICODE'); ! -- UNICODE --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); ! SELECT CONVERT('foo', 'UNICODE', 'SJIS'); ! -- TCVN --> UNICODE SELECT CONVERT('foo' USING tcvn_to_utf_8); ! SELECT CONVERT('foo', 'TCVN', 'UNICODE'); ! -- UNICODE --> TCVN SELECT CONVERT('foo' USING utf_8_to_tcvn); ! SELECT CONVERT('foo', 'UNICODE', 'TCVN'); ! -- UHC --> UNICODE SELECT CONVERT('foo' USING uhc_to_utf_8); ! SELECT CONVERT('foo', 'UHC', 'UNICODE'); ! -- UNICODE --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); ! SELECT CONVERT('foo', 'UNICODE', 'UHC'); ! -- UNICODE --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1250'); ! -- WIN1250 --> UNICODE SELECT CONVERT('foo' USING windows_1250_to_utf_8); ! SELECT CONVERT('foo', 'WIN1250', 'UNICODE'); ! -- UNICODE --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1256'); ! -- WIN1256 --> UNICODE SELECT CONVERT('foo' USING windows_1256_to_utf_8); ! SELECT CONVERT('foo', 'WIN1256', 'UNICODE'); ! -- UNICODE --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); ! SELECT CONVERT('foo', 'UNICODE', 'WIN874'); ! -- WIN874 --> UNICODE SELECT CONVERT('foo' USING windows_874_to_utf_8); ! SELECT CONVERT('foo', 'WIN874', 'UNICODE'); -- -- return to the super user -- --- 177,374 ---- -- MULE_INTERNAL --> LATIN4 SELECT CONVERT('foo' USING mic_to_iso_8859_4); SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN4'); ! -- SQL_ASCII --> UTF8 SELECT CONVERT('foo' USING ascii_to_utf_8); ! SELECT CONVERT('foo', 'SQL_ASCII', 'UTF8'); ! -- UTF8 --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); ! SELECT CONVERT('foo', 'UTF8', 'SQL_ASCII'); ! -- BIG5 --> UTF8 SELECT CONVERT('foo' USING big5_to_utf_8); ! SELECT CONVERT('foo', 'BIG5', 'UTF8'); ! -- UTF8 --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); ! SELECT CONVERT('foo', 'UTF8', 'BIG5'); ! -- UTF8 --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); ! SELECT CONVERT('foo', 'UTF8', 'KOI8R'); ! -- KOI8R --> UTF8 SELECT CONVERT('foo' USING koi8_r_to_utf_8); ! SELECT CONVERT('foo', 'KOI8R', 'UTF8'); ! -- UTF8 --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); ! SELECT CONVERT('foo', 'UTF8', 'WIN1251'); ! -- WIN1251 --> UTF8 SELECT CONVERT('foo' USING windows_1251_to_utf_8); ! SELECT CONVERT('foo', 'WIN1251', 'UTF8'); ! -- UTF8 --> WIN866 SELECT CONVERT('foo' USING utf_8_to_windows_866); ! SELECT CONVERT('foo', 'UTF8', 'WIN866'); ! -- WIN866 --> UTF8 SELECT CONVERT('foo' USING windows_866_to_utf_8); ! SELECT CONVERT('foo', 'WIN866', 'UTF8'); ! -- EUC_CN --> UTF8 SELECT CONVERT('foo' USING euc_cn_to_utf_8); ! SELECT CONVERT('foo', 'EUC_CN', 'UTF8'); ! -- UTF8 --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); ! SELECT CONVERT('foo', 'UTF8', 'EUC_CN'); ! -- EUC_JP --> UTF8 SELECT CONVERT('foo' USING euc_jp_to_utf_8); ! SELECT CONVERT('foo', 'EUC_JP', 'UTF8'); ! -- UTF8 --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); ! SELECT CONVERT('foo', 'UTF8', 'EUC_JP'); ! -- EUC_KR --> UTF8 SELECT CONVERT('foo' USING euc_kr_to_utf_8); ! SELECT CONVERT('foo', 'EUC_KR', 'UTF8'); ! -- UTF8 --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); ! SELECT CONVERT('foo', 'UTF8', 'EUC_KR'); ! -- EUC_TW --> UTF8 SELECT CONVERT('foo' USING euc_tw_to_utf_8); ! SELECT CONVERT('foo', 'EUC_TW', 'UTF8'); ! -- UTF8 --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); ! SELECT CONVERT('foo', 'UTF8', 'EUC_TW'); ! -- GB18030 --> UTF8 SELECT CONVERT('foo' USING gb18030_to_utf_8); ! SELECT CONVERT('foo', 'GB18030', 'UTF8'); ! -- UTF8 --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); ! SELECT CONVERT('foo', 'UTF8', 'GB18030'); ! -- GBK --> UTF8 SELECT CONVERT('foo' USING gbk_to_utf_8); ! SELECT CONVERT('foo', 'GBK', 'UTF8'); ! -- UTF8 --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); ! SELECT CONVERT('foo', 'UTF8', 'GBK'); ! -- UTF8 --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); ! SELECT CONVERT('foo', 'UTF8', 'LATIN2'); ! -- LATIN2 --> UTF8 SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); ! SELECT CONVERT('foo', 'LATIN2', 'UTF8'); ! -- UTF8 --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); ! SELECT CONVERT('foo', 'UTF8', 'LATIN3'); ! -- LATIN3 --> UTF8 SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); ! SELECT CONVERT('foo', 'LATIN3', 'UTF8'); ! -- UTF8 --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); ! SELECT CONVERT('foo', 'UTF8', 'LATIN4'); ! -- LATIN4 --> UTF8 SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); ! SELECT CONVERT('foo', 'LATIN4', 'UTF8'); ! -- UTF8 --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); ! SELECT CONVERT('foo', 'UTF8', 'LATIN5'); ! -- LATIN5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); ! SELECT CONVERT('foo', 'LATIN5', 'UTF8'); ! -- UTF8 --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); ! SELECT CONVERT('foo', 'UTF8', 'LATIN6'); ! -- LATIN6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); ! SELECT CONVERT('foo', 'LATIN6', 'UTF8'); ! -- UTF8 --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); ! SELECT CONVERT('foo', 'UTF8', 'LATIN7'); ! -- LATIN7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); ! SELECT CONVERT('foo', 'LATIN7', 'UTF8'); ! -- UTF8 --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); ! SELECT CONVERT('foo', 'UTF8', 'LATIN8'); ! -- LATIN8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); ! SELECT CONVERT('foo', 'LATIN8', 'UTF8'); ! -- UTF8 --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); ! SELECT CONVERT('foo', 'UTF8', 'LATIN9'); ! -- LATIN9 --> UTF8 SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); ! SELECT CONVERT('foo', 'LATIN9', 'UTF8'); ! -- UTF8 --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); ! SELECT CONVERT('foo', 'UTF8', 'LATIN10'); ! -- LATIN10 --> UTF8 SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); ! SELECT CONVERT('foo', 'LATIN10', 'UTF8'); ! -- UTF8 --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-5'); ! -- ISO-8859-5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-5', 'UTF8'); ! -- UTF8 --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-6'); ! -- ISO-8859-6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-6', 'UTF8'); ! -- UTF8 --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-7'); ! -- ISO-8859-7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-7', 'UTF8'); ! -- UTF8 --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-8'); ! -- ISO-8859-8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-8', 'UTF8'); ! -- LATIN1 --> UTF8 SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); ! SELECT CONVERT('foo', 'LATIN1', 'UTF8'); ! -- UTF8 --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); ! SELECT CONVERT('foo', 'UTF8', 'LATIN1'); ! -- JOHAB --> UTF8 SELECT CONVERT('foo' USING johab_to_utf_8); ! SELECT CONVERT('foo', 'JOHAB', 'UTF8'); ! -- UTF8 --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); ! SELECT CONVERT('foo', 'UTF8', 'JOHAB'); ! -- SJIS --> UTF8 SELECT CONVERT('foo' USING sjis_to_utf_8); ! SELECT CONVERT('foo', 'SJIS', 'UTF8'); ! -- UTF8 --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); ! SELECT CONVERT('foo', 'UTF8', 'SJIS'); ! -- WIN1258 --> UTF8 SELECT CONVERT('foo' USING tcvn_to_utf_8); ! SELECT CONVERT('foo', 'WIN1258', 'UTF8'); ! -- UTF8 --> WIN1258 SELECT CONVERT('foo' USING utf_8_to_tcvn); ! SELECT CONVERT('foo', 'UTF8', 'WIN1258'); ! -- UHC --> UTF8 SELECT CONVERT('foo' USING uhc_to_utf_8); ! SELECT CONVERT('foo', 'UHC', 'UTF8'); ! -- UTF8 --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); ! SELECT CONVERT('foo', 'UTF8', 'UHC'); ! -- UTF8 --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); ! SELECT CONVERT('foo', 'UTF8', 'WIN1250'); ! -- WIN1250 --> UTF8 SELECT CONVERT('foo' USING windows_1250_to_utf_8); ! SELECT CONVERT('foo', 'WIN1250', 'UTF8'); ! -- UTF8 --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); ! SELECT CONVERT('foo', 'UTF8', 'WIN1256'); ! -- WIN1256 --> UTF8 SELECT CONVERT('foo' USING windows_1256_to_utf_8); ! SELECT CONVERT('foo', 'WIN1256', 'UTF8'); ! -- UTF8 --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); ! SELECT CONVERT('foo', 'UTF8', 'WIN874'); ! -- WIN874 --> UTF8 SELECT CONVERT('foo' USING windows_874_to_utf_8); ! SELECT CONVERT('foo', 'WIN874', 'UTF8'); -- -- return to the super user --
Here is an updated version that handles all cases. It does rename the routine names so the primary encoding name is used for the routine names. This will be documented in the release notes if anyone actually uses those names in their code. This patch requires renaming of the utf8_and_tcvn directory so it will not apply cleanly. I left the routines named utf_8 alone because the code splits encoding names at breaks, like this iso_8859_7_to_utf_8. I assume that is OK. --------------------------------------------------------------------------- Bruce Momjian wrote: > Peter Eisentraut wrote: > > Am Freitag, 25. Februar 2005 05:51 schrieb Bruce Momjian: > > > so I see what he is saying. We are not consistent in favoring the > > > official names vs. the common names. > > > > > > I will work on a patch that people can review and test. > > > > I think this is what we should do: > > > > UNICODE => UTF8 > > ALT => WIN866 > > WIN => WIN1251 > > TCVN => WIN1258 > > > > That should clear it up. > > OK, here is a patch that makes those changes. > > The only uncertainty I have is with the the use of the TCVN conversion > routine names, e.g.: > > SELECT CONVERT('foo' USING tcvn_to_utf_8); > > I assume this is the same as: > > SELECT CONVERT('foo', 'WIN1258', 'UTF8'); > and > SELECT CONVERT('foo', 'TCVN', 'UTF8'); -- alias usage > > So, why would people use the routine name? Both forms are documented. > The first one with USING does not accept aliases, while the others do. > > I think this should be renamed to win1258_to_utf_8. However, this would > be an incompatibility. We should mention it in the release notes. > > Other than that the other conversion files were already named fine, e.g. > ascii_to_utf_8 (no UNICODE), however it is utf_8 and not utf8. I am > unsure how to handle these. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: doc/TODO =================================================================== RCS file: /cvsroot/pgsql/doc/TODO,v retrieving revision 1.1455 diff -c -c -r1.1455 TODO *** doc/TODO 25 Feb 2005 00:24:10 -0000 1.1455 --- doc/TODO 27 Feb 2005 03:36:16 -0000 *************** *** 215,221 **** * Optimize locale to have minimal performance impact when not used * Support multiple simultaneous character sets, per SQL92 ! * Improve Unicode combined character handling (?) * Add octet_length_server() and octet_length_client() * Make octet_length_client() the same as octet_length()? --- 215,221 ---- * Optimize locale to have minimal performance impact when not used * Support multiple simultaneous character sets, per SQL92 ! * Improve UTF8 combined character handling (?) * Add octet_length_server() and octet_length_client() * Make octet_length_client() the same as octet_length()? Index: doc/src/sgml/charset.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v retrieving revision 2.48 diff -c -c -r2.48 charset.sgml *** doc/src/sgml/charset.sgml 4 Jan 2005 00:05:44 -0000 2.48 --- doc/src/sgml/charset.sgml 27 Feb 2005 03:36:17 -0000 *************** *** 285,291 **** allows you to store text in a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as <acronym>EUC</> (Extended Unix ! Code), Unicode, and Mule internal code. All character sets can be used transparently throughout the server. (If you use extension functions from other sources, it depends on whether they wrote their code correctly.) The default character set is selected while --- 285,291 ---- allows you to store text in a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as <acronym>EUC</> (Extended Unix ! Code), UTF8, and Mule internal code. All character sets can be used transparently throughout the server. (If you use extension functions from other sources, it depends on whether they wrote their code correctly.) The default character set is selected while *************** *** 339,346 **** <entry>Taiwan <acronym>EUC</acronym></entry> </row> <row> ! <entry><literal>UNICODE</literal></entry> ! <entry>Unicode (<acronym>UTF</acronym>-8)</entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> --- 339,346 ---- <entry>Taiwan <acronym>EUC</acronym></entry> </row> <row> ! <entry><literal>UTF8</literal></entry> ! <entry>UTF8 (Unicode, 8-bit)</entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> *************** *** 407,413 **** <entry><acronym>KOI</acronym>8-R(U)</entry> </row> <row> ! <entry><literal>ALT</literal></entry> <entry>Windows CP866</entry> </row> <row> --- 407,413 ---- <entry><acronym>KOI</acronym>8-R(U)</entry> </row> <row> ! <entry><literal>WIN866</literal></entry> <entry>Windows CP866</entry> </row> <row> *************** *** 419,425 **** <entry>Windows CP1250</entry> </row> <row> ! <entry><literal>WIN</literal></entry> <entry>Windows CP1251</entry> </row> <row> --- 419,425 ---- <entry>Windows CP1250</entry> </row> <row> ! <entry><literal>WIN1251</literal></entry> <entry>Windows CP1251</entry> </row> <row> *************** *** 427,434 **** <entry>Windows CP1256 (Arabic)</entry> </row> <row> ! <entry><literal>TCVN</literal></entry> ! <entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry> </row> </tbody> </tgroup> --- 427,434 ---- <entry>Windows CP1256 (Arabic)</entry> </row> <row> ! <entry><literal>WIN1258</literal></entry> ! <entry>Windows CP1258 (Vietnamese)/<acronym>TCVN</>-5712</entry> </row> </tbody> </tgroup> *************** *** 504,510 **** regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP ! unicode | t-ishii | UNICODE (9 rows) </screen> </para> --- 504,510 ---- regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP ! utf8 | t-ishii | UTF8 (9 rows) </screen> </para> *************** *** 561,686 **** <tbody> <row> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>SQL_ASCII</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_JP</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>EUC_CN</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>EUC_KR</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>JOHAB</literal></entry> ! <entry><literal>JOHAB</literal>, <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>EUC_TW</literal></entry> <entry><literal>EUC_TW</literal>, <literal>BIG5</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN1</literal></entry> ! <entry><literal>LATIN1</literal>, <literal>UNICODE</literal> <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN3</literal></entry> ! <entry><literal>LATIN3</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN4</literal></entry> ! <entry><literal>LATIN4</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN5</literal></entry> ! <entry><literal>LATIN5</literal>, <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>LATIN6</literal></entry> ! <entry><literal>LATIN6</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN7</literal></entry> ! <entry><literal>LATIN7</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN8</literal></entry> ! <entry><literal>LATIN8</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN9</literal></entry> ! <entry><literal>LATIN9</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN10</literal></entry> ! <entry><literal>LATIN10</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> <entry><literal>ISO_8859_5</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>, ! <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal> </entry> </row> <row> <entry><literal>ISO_8859_6</literal></entry> <entry><literal>ISO_8859_6</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>ISO_8859_7</literal></entry> <entry><literal>ISO_8859_7</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>ISO_8859_8</literal></entry> <entry><literal>ISO_8859_8</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> ! <entry><literal>UNICODE</literal></entry> <entry> <literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>, --- 561,686 ---- <tbody> <row> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>SQL_ASCII</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_JP</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>EUC_CN</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>EUC_KR</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>JOHAB</literal></entry> ! <entry><literal>JOHAB</literal>, <literal>UTF8</literal> </entry> </row> <row> <entry><literal>EUC_TW</literal></entry> <entry><literal>EUC_TW</literal>, <literal>BIG5</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN1</literal></entry> ! <entry><literal>LATIN1</literal>, <literal>UTF8</literal> <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN3</literal></entry> ! <entry><literal>LATIN3</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN4</literal></entry> ! <entry><literal>LATIN4</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN5</literal></entry> ! <entry><literal>LATIN5</literal>, <literal>UTF8</literal> </entry> </row> <row> <entry><literal>LATIN6</literal></entry> ! <entry><literal>LATIN6</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN7</literal></entry> ! <entry><literal>LATIN7</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN8</literal></entry> ! <entry><literal>LATIN8</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN9</literal></entry> ! <entry><literal>LATIN9</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN10</literal></entry> ! <entry><literal>LATIN10</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> <entry><literal>ISO_8859_5</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal>, ! <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal> </entry> </row> <row> <entry><literal>ISO_8859_6</literal></entry> <entry><literal>ISO_8859_6</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>ISO_8859_7</literal></entry> <entry><literal>ISO_8859_7</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>ISO_8859_8</literal></entry> <entry><literal>ISO_8859_8</literal>, ! <literal>UTF8</literal> </entry> </row> <row> ! <entry><literal>UTF8</literal></entry> <entry> <literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>, *************** *** 691,700 **** <literal>ISO_8859_6</literal>, <literal>ISO_8859_7</literal>, <literal>ISO_8859_8</literal>, ! <literal>WIN</literal>, <literal>ALT</literal>, <literal>KOI8</literal>, <literal>WIN1256</literal>, ! <literal>TCVN</literal>, <literal>WIN874</literal>, <literal>GB18030</literal>, <literal>WIN1250</literal> --- 691,700 ---- <literal>ISO_8859_6</literal>, <literal>ISO_8859_7</literal>, <literal>ISO_8859_8</literal>, ! <literal>WIN1251</literal>, <literal>WIN866</literal>, <literal>KOI8</literal>, <literal>WIN1256</literal>, ! <literal>WIN1258</literal>, <literal>WIN874</literal>, <literal>GB18030</literal>, <literal>WIN1250</literal> *************** *** 704,756 **** <entry><literal>MULE_INTERNAL</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>, <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>, ! <literal>WIN</literal>, <literal>ALT</literal>, <literal>WIN1250</literal>, <literal>BIG5</literal>, <literal>ISO_8859_5</literal>, <literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>ALT</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>WIN1250</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> ! <entry><literal>TCVN</literal></entry> ! <entry><literal>TCVN</literal>, ! <literal>UNICODE</literal> </entry> </row> </tbody> --- 704,756 ---- <entry><literal>MULE_INTERNAL</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>, <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>, ! <literal>WIN1251</literal>, <literal>WIN866</literal>, <literal>WIN1250</literal>, <literal>BIG5</literal>, <literal>ISO_8859_5</literal>, <literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN866</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>WIN1250</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal>, ! <literal>UTF8</literal> </entry> </row> <row> ! <entry><literal>WIN1258</literal></entry> ! <entry><literal>WIN1258</literal>, ! <literal>UTF8</literal> </entry> </row> </tbody> Index: doc/src/sgml/func.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.238 diff -c -c -r1.238 func.sgml *** doc/src/sgml/func.sgml 11 Feb 2005 04:31:54 -0000 1.238 --- doc/src/sgml/func.sgml 27 Feb 2005 03:36:22 -0000 *************** *** 934,940 **** names. </entry> <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf_8)</literal></entry> ! <entry><literal>'PostgreSQL'</literal> in Unicode (UTF-8) encoding</entry> </row> <row> --- 934,940 ---- names. </entry> <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf_8)</literal></entry> ! <entry><literal>'PostgreSQL'</literal> in UTF8 (Unicode, 8-bit) encoding</entry> </row> <row> *************** *** 1105,1112 **** <parameter>src_encoding</parameter> is omitted, database encoding is assumed. </entry> ! <entry><literal>convert( 'text_in_unicode', 'UNICODE', 'LATIN1')</literal></entry> ! <entry><literal>text_in_unicode</literal> represented in ISO 8859-1 encoding</entry> </row> <row> --- 1105,1112 ---- <parameter>src_encoding</parameter> is omitted, database encoding is assumed. </entry> ! <entry><literal>convert( 'text_in_utf8', 'UTF8', 'LATIN1')</literal></entry> ! <entry><literal>text_in_utf8</literal> represented in ISO 8859-1 encoding</entry> </row> <row> *************** *** 1423,1429 **** <row> <entry><literal>ascii_to_utf_8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1423,1429 ---- <row> <entry><literal>ascii_to_utf_8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1441,1447 **** <row> <entry><literal>big5_to_utf_8</literal></entry> <entry><literal>BIG5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1441,1447 ---- <row> <entry><literal>big5_to_utf_8</literal></entry> <entry><literal>BIG5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1453,1459 **** <row> <entry><literal>euc_cn_to_utf_8</literal></entry> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1453,1459 ---- <row> <entry><literal>euc_cn_to_utf_8</literal></entry> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1471,1477 **** <row> <entry><literal>euc_jp_to_utf_8</literal></entry> <entry><literal>EUC_JP</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1471,1477 ---- <row> <entry><literal>euc_jp_to_utf_8</literal></entry> <entry><literal>EUC_JP</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1483,1489 **** <row> <entry><literal>euc_kr_to_utf_8</literal></entry> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1483,1489 ---- <row> <entry><literal>euc_kr_to_utf_8</literal></entry> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1501,1549 **** <row> <entry><literal>euc_tw_to_utf_8</literal></entry> <entry><literal>EUC_TW</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>gb18030_to_utf_8</literal></entry> <entry><literal>GB18030</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>gbk_to_utf_8</literal></entry> <entry><literal>GBK</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_10_to_utf_8</literal></entry> <entry><literal>LATIN6</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_13_to_utf_8</literal></entry> <entry><literal>LATIN7</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_14_to_utf_8</literal></entry> <entry><literal>LATIN8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_15_to_utf_8</literal></entry> <entry><literal>LATIN9</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_16_to_utf_8</literal></entry> <entry><literal>LATIN10</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1501,1549 ---- <row> <entry><literal>euc_tw_to_utf_8</literal></entry> <entry><literal>EUC_TW</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>gb18030_to_utf_8</literal></entry> <entry><literal>GB18030</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>gbk_to_utf_8</literal></entry> <entry><literal>GBK</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_10_to_utf_8</literal></entry> <entry><literal>LATIN6</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_13_to_utf_8</literal></entry> <entry><literal>LATIN7</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_14_to_utf_8</literal></entry> <entry><literal>LATIN8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_15_to_utf_8</literal></entry> <entry><literal>LATIN9</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_16_to_utf_8</literal></entry> <entry><literal>LATIN10</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1555,1561 **** <row> <entry><literal>iso_8859_1_to_utf_8</literal></entry> <entry><literal>LATIN1</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1555,1561 ---- <row> <entry><literal>iso_8859_1_to_utf_8</literal></entry> <entry><literal>LATIN1</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1567,1573 **** <row> <entry><literal>iso_8859_2_to_utf_8</literal></entry> <entry><literal>LATIN2</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1567,1573 ---- <row> <entry><literal>iso_8859_2_to_utf_8</literal></entry> <entry><literal>LATIN2</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1585,1591 **** <row> <entry><literal>iso_8859_3_to_utf_8</literal></entry> <entry><literal>LATIN3</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1585,1591 ---- <row> <entry><literal>iso_8859_3_to_utf_8</literal></entry> <entry><literal>LATIN3</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1597,1603 **** <row> <entry><literal>iso_8859_4_to_utf_8</literal></entry> <entry><literal>LATIN4</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1597,1603 ---- <row> <entry><literal>iso_8859_4_to_utf_8</literal></entry> <entry><literal>LATIN4</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1615,1663 **** <row> <entry><literal>iso_8859_5_to_utf_8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>iso_8859_6_to_utf_8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_7_to_utf_8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_8_to_utf_8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_9_to_utf_8</literal></entry> <entry><literal>LATIN5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>johab_to_utf_8</literal></entry> <entry><literal>JOHAB</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1615,1663 ---- <row> <entry><literal>iso_8859_5_to_utf_8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> <entry><literal>iso_8859_6_to_utf_8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_7_to_utf_8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_8_to_utf_8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_9_to_utf_8</literal></entry> <entry><literal>LATIN5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>johab_to_utf_8</literal></entry> <entry><literal>JOHAB</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1675,1693 **** <row> <entry><literal>koi8_r_to_utf_8</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_1251</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_866</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> --- 1675,1693 ---- <row> <entry><literal>koi8_r_to_utf_8</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_1251</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_866</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> *************** *** 1777,1789 **** <row> <entry><literal>mic_to_windows_1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>mic_to_windows_866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> --- 1777,1789 ---- <row> <entry><literal>mic_to_windows_1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>mic_to_windows_866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> *************** *** 1801,2010 **** <row> <entry><literal>sjis_to_utf_8</literal></entry> <entry><literal>SJIS</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>tcvn_to_utf_8</literal></entry> ! <entry><literal>TCVN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>uhc_to_utf_8</literal></entry> <entry><literal>UHC</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>utf_8_to_ascii</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>SQL_ASCII</literal></entry> </row> <row> <entry><literal>utf_8_to_big5</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>BIG5</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_cn</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_CN</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_jp</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_JP</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_kr</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_KR</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_tw</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_TW</literal></entry> </row> <row> <entry><literal>utf_8_to_gb18030</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>GB18030</literal></entry> </row> <row> <entry><literal>utf_8_to_gbk</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>GBK</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_1</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN1</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_10</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_13</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_14</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_15</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN9</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_16</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN10</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_2</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN2</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_3</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN3</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_4</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN4</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_5</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_6</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_7</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_8</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_9</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN5</literal></entry> </row> <row> <entry><literal>utf_8_to_johab</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>JOHAB</literal></entry> </row> <row> <entry><literal>utf_8_to_koi8_r</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>utf_8_to_sjis</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>SJIS</literal></entry> </row> <row> <entry><literal>utf_8_to_tcvn</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>TCVN</literal></entry> </row> <row> <entry><literal>utf_8_to_uhc</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>UHC</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1250</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN1250</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1251</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1256</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN1256</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_866</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_874</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN874</literal></entry> </row> --- 1801,2010 ---- <row> <entry><literal>sjis_to_utf_8</literal></entry> <entry><literal>SJIS</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>tcvn_to_utf_8</literal></entry> ! <entry><literal>WIN1258</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>uhc_to_utf_8</literal></entry> <entry><literal>UHC</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>utf_8_to_ascii</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> </row> <row> <entry><literal>utf_8_to_big5</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>BIG5</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_cn</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_CN</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_jp</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_JP</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_kr</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_KR</literal></entry> </row> <row> <entry><literal>utf_8_to_euc_tw</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_TW</literal></entry> </row> <row> <entry><literal>utf_8_to_gb18030</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>GB18030</literal></entry> </row> <row> <entry><literal>utf_8_to_gbk</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>GBK</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_1</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN1</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_10</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_13</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_14</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_15</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN9</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_16</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN10</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_2</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN2</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_3</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN3</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_4</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN4</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_5</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_6</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_7</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_8</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> </row> <row> <entry><literal>utf_8_to_iso_8859_9</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN5</literal></entry> </row> <row> <entry><literal>utf_8_to_johab</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>JOHAB</literal></entry> </row> <row> <entry><literal>utf_8_to_koi8_r</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>utf_8_to_sjis</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>SJIS</literal></entry> </row> <row> <entry><literal>utf_8_to_tcvn</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN1258</literal></entry> </row> <row> <entry><literal>utf_8_to_uhc</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>UHC</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1250</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN1250</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1251</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_1256</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN1256</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_866</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> <entry><literal>utf_8_to_windows_874</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN874</literal></entry> </row> *************** *** 2023,2101 **** <row> <entry><literal>windows_1250_to_utf_8</literal></entry> <entry><literal>WIN1250</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_1251_to_iso_8859_5</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_1251_to_koi8_r</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_1251_to_mic</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_1251_to_utf_8</literal></entry> ! <entry><literal>WIN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_1251_to_windows_866</literal></entry> ! <entry><literal>WIN</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> <entry><literal>windows_1256_to_utf_8</literal></entry> <entry><literal>WIN1256</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_866_to_iso_8859_5</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_866_to_koi8_r</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_866_to_mic</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_866_to_utf_8</literal></entry> ! <entry><literal>ALT</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_866_to_windows_1251</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>windows_874_to_utf_8</literal></entry> <entry><literal>WIN874</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> </tbody> --- 2023,2101 ---- <row> <entry><literal>windows_1250_to_utf_8</literal></entry> <entry><literal>WIN1250</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_1251_to_iso_8859_5</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_1251_to_koi8_r</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_1251_to_mic</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_1251_to_utf_8</literal></entry> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_1251_to_windows_866</literal></entry> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> <entry><literal>windows_1256_to_utf_8</literal></entry> <entry><literal>WIN1256</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_866_to_iso_8859_5</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_866_to_koi8_r</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_866_to_mic</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> <entry><literal>windows_866_to_utf_8</literal></entry> ! <entry><literal>WIN866</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_866_to_windows_1251</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>windows_874_to_utf_8</literal></entry> <entry><literal>WIN874</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> </tbody> *************** *** 3372,3378 **** <row> <entry> <literal>\u</><replaceable>wxyz</> </entry> <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) ! the Unicode character <literal>U+</><replaceable>wxyz</> in the local byte ordering </entry> </row> --- 3372,3378 ---- <row> <entry> <literal>\u</><replaceable>wxyz</> </entry> <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) ! the UTF16 (Unicode, 16-bit) character <literal>U+</><replaceable>wxyz</> in the local byte ordering </entry> </row> Index: doc/src/sgml/ref/comment.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v retrieving revision 1.26 diff -c -c -r1.26 comment.sgml *** doc/src/sgml/ref/comment.sgml 4 Jan 2005 00:39:53 -0000 1.26 --- doc/src/sgml/ref/comment.sgml 27 Feb 2005 03:36:23 -0000 *************** *** 195,201 **** COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance'; COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4'; COMMENT ON COLUMN my_table.my_column IS 'Employee ID number'; ! COMMENT ON CONVERSION my_conv IS 'Conversion to Unicode'; COMMENT ON DATABASE my_database IS 'Development Database'; COMMENT ON DOMAIN my_domain IS 'Email Address Domain'; COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral'; --- 195,201 ---- COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance'; COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4'; COMMENT ON COLUMN my_table.my_column IS 'Employee ID number'; ! COMMENT ON CONVERSION my_conv IS 'Conversion to UTF8'; COMMENT ON DATABASE my_database IS 'Development Database'; COMMENT ON DOMAIN my_domain IS 'Email Address Domain'; COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral'; Index: doc/src/sgml/ref/create_conversion.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v retrieving revision 1.14 diff -c -c -r1.14 create_conversion.sgml *** doc/src/sgml/ref/create_conversion.sgml 29 Nov 2003 19:51:38 -0000 1.14 --- doc/src/sgml/ref/create_conversion.sgml 27 Feb 2005 03:36:23 -0000 *************** *** 136,145 **** <title>Examples</title> <para> ! To create a conversion from encoding <literal>UNICODE</literal> to <literal>LATIN1</literal> using <function>myfunc</>: <programlisting> ! CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc; </programlisting> </para> </refsect1> --- 136,145 ---- <title>Examples</title> <para> ! To create a conversion from encoding <literal>UTF8</literal> to <literal>LATIN1</literal> using <function>myfunc</>: <programlisting> ! CREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc; </programlisting> </para> </refsect1> Index: src/backend/utils/adt/selfuncs.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v retrieving revision 1.171 diff -c -c -r1.171 selfuncs.c *** src/backend/utils/adt/selfuncs.c 1 Feb 2005 23:07:58 -0000 1.171 --- src/backend/utils/adt/selfuncs.c 27 Feb 2005 03:36:26 -0000 *************** *** 4035,4041 **** * * NOTE: at present this assumes we are in the C locale, so that simple * bytewise comparison applies. However, we might be in a multibyte ! * encoding such as UTF-8, so we do have to watch out for generating * invalid encoding sequences. */ Const * --- 4035,4041 ---- * * NOTE: at present this assumes we are in the C locale, so that simple * bytewise comparison applies. However, we might be in a multibyte ! * encoding such as UTF8, so we do have to watch out for generating * invalid encoding sequences. */ Const * Index: src/backend/utils/mb/conv.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conv.c,v retrieving revision 1.51 diff -c -c -r1.51 conv.c *** src/backend/utils/mb/conv.c 31 Dec 2004 22:01:42 -0000 1.51 --- src/backend/utils/mb/conv.c 27 Feb 2005 03:36:26 -0000 *************** *** 303,309 **** /* * comparison routine for bsearch() ! * this routine is intended for UTF-8 -> local code */ static int compare1(const void *p1, const void *p2) --- 303,309 ---- /* * comparison routine for bsearch() ! * this routine is intended for UTF8 -> local code */ static int compare1(const void *p1, const void *p2) *************** *** 318,324 **** /* * comparison routine for bsearch() ! * this routine is intended for local code -> UTF-8 */ static int compare2(const void *p1, const void *p2) --- 318,324 ---- /* * comparison routine for bsearch() ! * this routine is intended for local code -> UTF8 */ static int compare2(const void *p1, const void *p2) *************** *** 332,340 **** } /* ! * UTF-8 ---> local code * ! * utf: input UTF-8 string. Its length is limited by "len" parameter * or a null terminator. * iso: pointer to the output. * map: the conversion map. --- 332,340 ---- } /* ! * UTF8 ---> local code * ! * utf: input UTF8 string. Its length is limited by "len" parameter * or a null terminator. * iso: pointer to the output. * map: the conversion map. *************** *** 373,379 **** { ereport(WARNING, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), ! errmsg("ignoring unconvertible UTF-8 character 0x%04x", iutf))); continue; } --- 373,379 ---- { ereport(WARNING, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), ! errmsg("ignoring unconvertible UTF8 character 0x%04x", iutf))); continue; } *************** *** 390,396 **** } /* ! * local code ---> UTF-8 */ void LocalToUtf(unsigned char *iso, unsigned char *utf, --- 390,396 ---- } /* ! * local code ---> UTF8 */ void LocalToUtf(unsigned char *iso, unsigned char *utf, Index: src/backend/utils/mb/encnames.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/encnames.c,v retrieving revision 1.22 diff -c -c -r1.22 encnames.c *** src/backend/utils/mb/encnames.c 4 Dec 2004 18:19:31 -0000 1.22 --- src/backend/utils/mb/encnames.c 27 Feb 2005 03:36:26 -0000 *************** *** 27,33 **** * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1 * are always converted to 'iso88591'. All must be lower case. * ! * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needful? * * Karel Zak, Aug 2001 * ---------- --- 27,33 ---- * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1 * are always converted to 'iso88591'. All must be lower case. * ! * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needed? * * Karel Zak, Aug 2001 * ---------- *************** *** 35,44 **** pg_encname pg_encname_tbl[] = { { ! "abc", PG_TCVN ! }, /* alias for TCVN */ { ! "alt", PG_ALT }, /* IBM866 */ { "big5", PG_BIG5 --- 35,44 ---- pg_encname pg_encname_tbl[] = { { ! "abc", PG_WIN1258 ! }, /* alias for WIN1258 */ { ! "alt", PG_WIN866 }, /* IBM866 */ { "big5", PG_BIG5 *************** *** 166,188 **** "sqlascii", PG_SQL_ASCII }, { ! "tcvn", PG_TCVN ! }, /* TCVN; Vietnamese TCVN-5712 */ { ! "tcvn5712", PG_TCVN ! }, /* alias for TCVN */ { "uhc", PG_UHC }, /* UHC; Korean Windows CodePage 949 */ { "unicode", PG_UTF8 ! }, /* alias for UTF-8 */ { "utf8", PG_UTF8 ! }, /* UTF-8; RFC2279 */ { ! "vscii", PG_TCVN ! }, /* alias for TCVN */ { "win", PG_WIN1251 }, /* _dirty_ alias for windows-1251 --- 166,191 ---- "sqlascii", PG_SQL_ASCII }, { ! "tcvn", PG_WIN1258 ! }, /* alias for WIN1258 */ { ! "tcvn5712", PG_WIN1258 ! }, /* alias for WIN1258 */ { "uhc", PG_UHC }, /* UHC; Korean Windows CodePage 949 */ { "unicode", PG_UTF8 ! }, /* alias for UTF8 */ ! { ! "utf-8", PG_UTF8 ! }, /* UTF8; RFC2279 */ { "utf8", PG_UTF8 ! }, /* alias for UTF8 */ { ! "vscii", PG_WIN1258 ! }, /* alias for WIN1258 */ { "win", PG_WIN1251 }, /* _dirty_ alias for windows-1251 *************** *** 197,205 **** "win1256", PG_WIN1256 }, /* alias for Windows-1256 */ { ! "win1258", PG_TCVN }, /* alias for Windows-1258 */ { "win874", PG_WIN874 }, /* alias for Windows-874 */ { --- 200,211 ---- "win1256", PG_WIN1256 }, /* alias for Windows-1256 */ { ! "win1258", PG_WIN1258 }, /* alias for Windows-1258 */ { + "win866", PG_WIN866 + }, /* IBM866 */ + { "win874", PG_WIN874 }, /* alias for Windows-874 */ { *************** *** 224,232 **** "windows1256", PG_WIN1256 }, /* Windows-1256; Microsoft */ { ! "windows1258", PG_TCVN }, /* Windows-1258; Microsoft */ { "windows874", PG_WIN874 }, /* Windows-874; Microsoft */ { --- 230,241 ---- "windows1256", PG_WIN1256 }, /* Windows-1256; Microsoft */ { ! "windows1258", PG_WIN1258 }, /* Windows-1258; Microsoft */ { + "windows866", PG_WIN866 + }, /* IBM866 */ + { "windows874", PG_WIN874 }, /* Windows-874; Microsoft */ { *************** *** 275,281 **** "JOHAB", PG_JOHAB }, { ! "UNICODE", PG_UTF8 }, { "MULE_INTERNAL", PG_MULE_INTERNAL --- 284,290 ---- "JOHAB", PG_JOHAB }, { ! "UTF8", PG_UTF8 }, { "MULE_INTERNAL", PG_MULE_INTERNAL *************** *** 314,332 **** "WIN1256", PG_WIN1256 }, { ! "TCVN", PG_TCVN }, { ! "WIN874", PG_WIN874 }, { ! "KOI8", PG_KOI8R }, { ! "WIN", PG_WIN1251 }, { ! "ALT", PG_ALT }, { "ISO_8859_5", PG_ISO_8859_5 --- 323,341 ---- "WIN1256", PG_WIN1256 }, { ! "WIN1258", PG_WIN1258 }, { ! "WIN866", PG_WIN866 }, { ! "WIN874", PG_WIN874 }, { ! "KOI8", PG_KOI8R }, { ! "WIN1251", PG_WIN1251 }, { "ISO_8859_5", PG_ISO_8859_5 Index: src/backend/utils/mb/mbutils.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v retrieving revision 1.48 diff -c -c -r1.48 mbutils.c *** src/backend/utils/mb/mbutils.c 13 Oct 2004 01:25:12 -0000 1.48 --- src/backend/utils/mb/mbutils.c 27 Feb 2005 03:36:26 -0000 *************** *** 222,228 **** * * XXX We assume that storage for converted result is 4-to-1 growth in * the worst case. The rate for currently supported encoding pares are within 3 ! * (SJIS JIS X0201 half width kanna -> UTF-8 is the worst case). * So "4" should be enough for the moment. */ unsigned char * --- 222,228 ---- * * XXX We assume that storage for converted result is 4-to-1 growth in * the worst case. The rate for currently supported encoding pares are within 3 ! * (SJIS JIS X0201 half width kanna -> UTF8 is the worst case). * So "4" should be enough for the moment. */ unsigned char * Index: src/backend/utils/mb/wchar.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/wchar.c,v retrieving revision 1.40 diff -c -c -r1.40 wchar.c *** src/backend/utils/mb/wchar.c 3 Dec 2004 01:20:20 -0000 1.40 --- src/backend/utils/mb/wchar.c 27 Feb 2005 03:36:26 -0000 *************** *** 344,350 **** } /* ! * convert UTF-8 string to pg_wchar (UCS-2) * caller should allocate enough space for "to" * len: length of from. * "from" not necessarily null terminated. --- 344,350 ---- } /* ! * convert UTF8 string to pg_wchar (UCS-2) * caller should allocate enough space for "to" * len: length of from. * "from" not necessarily null terminated. *************** *** 395,401 **** } /* ! * returns the byte length of a UTF-8 word pointed to by s */ int pg_utf_mblen(const unsigned char *s) --- 395,401 ---- } /* ! * returns the byte length of a UTF8 word pointed to by s */ int pg_utf_mblen(const unsigned char *s) *************** *** 721,728 **** {pg_euckr2wchar_with_len, pg_euckr_mblen, pg_euckr_dsplen, 3}, /* 3; PG_EUC_KR */ {pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_dsplen, 3}, /* 4; PG_EUC_TW */ {pg_johab2wchar_with_len, pg_johab_mblen, pg_johab_dsplen, 3}, /* 5; PG_JOHAB */ ! {pg_utf2wchar_with_len, pg_utf_mblen, pg_utf_dsplen, 3}, /* 6; PG_UNICODE */ ! {pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_dsplen, 3}, /* 7; PG_MULE_INTERNAL */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 8; PG_LATIN1 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 9; PG_LATIN2 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 10; PG_LATIN3 */ --- 721,728 ---- {pg_euckr2wchar_with_len, pg_euckr_mblen, pg_euckr_dsplen, 3}, /* 3; PG_EUC_KR */ {pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_dsplen, 3}, /* 4; PG_EUC_TW */ {pg_johab2wchar_with_len, pg_johab_mblen, pg_johab_dsplen, 3}, /* 5; PG_JOHAB */ ! {pg_utf2wchar_with_len, pg_utf_mblen, pg_utf_dsplen, 3}, /* 6; PG_UTF8 */ ! {pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_dsplen, 3}, /* 7; PG_MULE_INTERNAL */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 8; PG_LATIN1 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 9; PG_LATIN2 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 10; PG_LATIN3 */ *************** *** 822,828 **** while (len > 0 && *mbstr) { ! /* special UTF-8 check */ if (encoding == PG_UTF8 && (*mbstr & 0xf8) == 0xf0) { if (noError) --- 822,828 ---- while (len > 0 && *mbstr) { ! /* special UTF8 check */ if (encoding == PG_UTF8 && (*mbstr & 0xf8) == 0xf0) { if (noError) Index: src/backend/utils/mb/Unicode/UCS_to_8859.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_8859.pl,v retrieving revision 1.7 diff -c -c -r1.7 UCS_to_8859.pl *** src/backend/utils/mb/Unicode/UCS_to_8859.pl 1 Jan 2005 20:44:18 -0000 1.7 --- src/backend/utils/mb/Unicode/UCS_to_8859.pl 27 Feb 2005 03:36:26 -0000 *************** *** 39,45 **** if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 39,45 ---- if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 83,89 **** if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 83,89 ---- if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_BIG5.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_BIG5.pl *** src/backend/utils/mb/Unicode/UCS_to_BIG5.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_BIG5.pl 27 Feb 2005 03:36:26 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_EUC_CN.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl 27 Feb 2005 03:36:26 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_EUC_JP.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl 27 Feb 2005 03:36:27 -0000 *************** *** 51,57 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 51,57 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 80,86 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 80,86 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 108,114 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 108,114 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl,v retrieving revision 1.7 diff -c -c -r1.7 UCS_to_EUC_KR.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl 1 Jan 2005 20:44:18 -0000 1.7 --- src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl 27 Feb 2005 03:36:27 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_EUC_TW.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl 27 Feb 2005 03:36:27 -0000 *************** *** 36,42 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 36,42 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_GB18030.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl,v retrieving revision 1.4 diff -c -c -r1.4 UCS_to_GB18030.pl *** src/backend/utils/mb/Unicode/UCS_to_GB18030.pl 29 Nov 2003 22:40:01 -0000 1.4 --- src/backend/utils/mb/Unicode/UCS_to_GB18030.pl 27 Feb 2005 03:36:27 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_GBK.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_GBK.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_GBK.pl *** src/backend/utils/mb/Unicode/UCS_to_GBK.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_GBK.pl 27 Feb 2005 03:36:27 -0000 *************** *** 36,42 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 36,42 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_JOHAB.pl *** src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl 27 Feb 2005 03:36:27 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_SJIS.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl,v retrieving revision 1.7 diff -c -c -r1.7 UCS_to_SJIS.pl *** src/backend/utils/mb/Unicode/UCS_to_SJIS.pl 1 Jan 2005 20:44:18 -0000 1.7 --- src/backend/utils/mb/Unicode/UCS_to_SJIS.pl 27 Feb 2005 03:36:27 -0000 *************** *** 52,58 **** || (( $code >= 0x879a ) && ( $code <= 0x879c ))) { ! printf STDERR "Warning: duplicate unicode : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code; next; } $count++; --- 52,58 ---- || (( $code >= 0x879a ) && ( $code <= 0x879c ))) { ! printf STDERR "Warning: duplicate UTF8 : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_UHC.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_UHC.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_UHC.pl *** src/backend/utils/mb/Unicode/UCS_to_UHC.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_UHC.pl 27 Feb 2005 03:36:27 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_WIN874.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_WIN874.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_WIN874.pl *** src/backend/utils/mb/Unicode/UCS_to_WIN874.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_WIN874.pl 27 Feb 2005 03:36:27 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_WINX.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_WINX.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_WINX.pl *** src/backend/utils/mb/Unicode/UCS_to_WINX.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_WINX.pl 27 Feb 2005 03:36:27 -0000 *************** *** 42,48 **** if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 42,48 ---- if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 86,92 **** if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 86,92 ---- if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_cyrillic.pl *** src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl 27 Feb 2005 03:36:27 -0000 *************** *** 41,47 **** if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 41,47 ---- if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 85,91 **** if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 85,91 ---- if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/conversion_procs/Makefile =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v retrieving revision 1.11 diff -c -c -r1.11 Makefile *** src/backend/utils/mb/conversion_procs/Makefile 21 Jan 2004 19:22:19 -0000 1.11 --- src/backend/utils/mb/conversion_procs/Makefile 27 Feb 2005 03:36:27 -0000 *************** *** 23,29 **** utf8_and_ascii utf8_and_big5 utf8_and_cyrillic utf8_and_euc_cn \ utf8_and_euc_jp utf8_and_euc_kr utf8_and_euc_tw utf8_and_gb18030 \ utf8_and_gbk utf8_and_iso8859 utf8_and_iso8859_1 utf8_and_johab \ ! utf8_and_sjis utf8_and_tcvn utf8_and_uhc utf8_and_win1250 \ utf8_and_win1256 utf8_and_win874 # conversion_name source_encoding destination_encoding function object --- 23,29 ---- utf8_and_ascii utf8_and_big5 utf8_and_cyrillic utf8_and_euc_cn \ utf8_and_euc_jp utf8_and_euc_kr utf8_and_euc_tw utf8_and_gb18030 \ utf8_and_gbk utf8_and_iso8859 utf8_and_iso8859_1 utf8_and_johab \ ! utf8_and_sjis utf8_and_win1258 utf8_and_uhc utf8_and_win1250 \ utf8_and_win1256 utf8_and_win874 # conversion_name source_encoding destination_encoding function object *************** *** 36,55 **** mic_to_iso_8859_5 MULE_INTERNAL ISO-8859-5 mic_to_iso cyrillic_and_mic \ windows_1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic \ mic_to_windows_1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic \ ! windows_866_to_mic ALT MULE_INTERNAL alt_to_mic cyrillic_and_mic \ ! mic_to_windows_866 MULE_INTERNAL ALT mic_to_alt cyrillic_and_mic \ koi8_r_to_windows_1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic \ windows_1251_to_koi8_r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic \ ! koi8_r_to_windows_866 KOI8R ALT koi8r_to_alt cyrillic_and_mic \ ! windows_866_to_koi8_r ALT KOI8R alt_to_koi8r cyrillic_and_mic \ ! windows_866_to_windows_1251 ALT WIN1251 alt_to_win1251 cyrillic_and_mic \ ! windows_1251_to_windows_866 WIN1251 ALT win1251_to_alt cyrillic_and_mic \ iso_8859_5_to_koi8_r ISO-8859-5 KOI8R iso_to_koi8r cyrillic_and_mic \ koi8_r_to_iso_8859_5 KOI8R ISO-8859-5 koi8r_to_iso cyrillic_and_mic \ iso_8859_5_to_windows_1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic \ windows_1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic \ ! iso_8859_5_to_windows_866 ISO-8859-5 ALT iso_to_alt cyrillic_and_mic \ ! windows_866_to_iso_8859_5 ALT ISO-8859-5 alt_to_iso cyrillic_and_mic \ euc_cn_to_mic EUC_CN MULE_INTERNAL euc_cn_to_mic euc_cn_and_mic \ mic_to_euc_cn MULE_INTERNAL EUC_CN mic_to_euc_cn euc_cn_and_mic \ euc_jp_to_sjis EUC_JP SJIS euc_jp_to_sjis euc_jp_and_sjis \ --- 36,55 ---- mic_to_iso_8859_5 MULE_INTERNAL ISO-8859-5 mic_to_iso cyrillic_and_mic \ windows_1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic \ mic_to_windows_1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic \ ! windows_866_to_mic WIN866 MULE_INTERNAL win866_to_mic cyrillic_and_mic \ ! mic_to_windows_866 MULE_INTERNAL WIN866 mic_to_win866 cyrillic_and_mic \ koi8_r_to_windows_1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic \ windows_1251_to_koi8_r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic \ ! koi8_r_to_windows_866 KOI8R WIN866 koi8r_to_win866 cyrillic_and_mic \ ! windows_866_to_koi8_r WIN866 KOI8R win866_to_koi8r cyrillic_and_mic \ ! windows_866_to_windows_1251 WIN866 WIN1251 win866_to_win1251 cyrillic_and_mic \ ! windows_1251_to_windows_866 WIN1251 WIN866 win1251_to_win866 cyrillic_and_mic \ iso_8859_5_to_koi8_r ISO-8859-5 KOI8R iso_to_koi8r cyrillic_and_mic \ koi8_r_to_iso_8859_5 KOI8R ISO-8859-5 koi8r_to_iso cyrillic_and_mic \ iso_8859_5_to_windows_1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic \ windows_1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic \ ! iso_8859_5_to_windows_866 ISO-8859-5 WIN866 iso_to_win866 cyrillic_and_mic \ ! windows_866_to_iso_8859_5 WIN866 ISO-8859-5 win866_to_iso cyrillic_and_mic \ euc_cn_to_mic EUC_CN MULE_INTERNAL euc_cn_to_mic euc_cn_and_mic \ mic_to_euc_cn MULE_INTERNAL EUC_CN mic_to_euc_cn euc_cn_and_mic \ euc_jp_to_sjis EUC_JP SJIS euc_jp_to_sjis euc_jp_and_sjis \ *************** *** 78,147 **** mic_to_iso_8859_3 MULE_INTERNAL LATIN3 mic_to_latin3 latin_and_mic \ iso_8859_4_to_mic LATIN4 MULE_INTERNAL latin4_to_mic latin_and_mic \ mic_to_iso_8859_4 MULE_INTERNAL LATIN4 mic_to_latin4 latin_and_mic \ ! ascii_to_utf_8 SQL_ASCII UNICODE ascii_to_utf8 utf8_and_ascii \ ! utf_8_to_ascii UNICODE SQL_ASCII utf8_to_ascii utf8_and_ascii \ ! big5_to_utf_8 BIG5 UNICODE big5_to_utf8 utf8_and_big5 \ ! utf_8_to_big5 UNICODE BIG5 utf8_to_big5 utf8_and_big5 \ ! utf_8_to_koi8_r UNICODE KOI8R utf8_to_koi8r utf8_and_cyrillic \ ! koi8_r_to_utf_8 KOI8R UNICODE koi8r_to_utf8 utf8_and_cyrillic \ ! utf_8_to_windows_1251 UNICODE WIN1251 utf8_to_win1251 utf8_and_cyrillic \ ! windows_1251_to_utf_8 WIN1251 UNICODE win1251_to_utf8 utf8_and_cyrillic \ ! utf_8_to_windows_866 UNICODE ALT utf8_to_alt utf8_and_cyrillic \ ! windows_866_to_utf_8 ALT UNICODE alt_to_utf8 utf8_and_cyrillic \ ! euc_cn_to_utf_8 EUC_CN UNICODE euc_cn_to_utf8 utf8_and_euc_cn \ ! utf_8_to_euc_cn UNICODE EUC_CN utf8_to_euc_cn utf8_and_euc_cn \ ! euc_jp_to_utf_8 EUC_JP UNICODE euc_jp_to_utf8 utf8_and_euc_jp \ ! utf_8_to_euc_jp UNICODE EUC_JP utf8_to_euc_jp utf8_and_euc_jp \ ! euc_kr_to_utf_8 EUC_KR UNICODE euc_kr_to_utf8 utf8_and_euc_kr \ ! utf_8_to_euc_kr UNICODE EUC_KR utf8_to_euc_kr utf8_and_euc_kr \ ! euc_tw_to_utf_8 EUC_TW UNICODE euc_tw_to_utf8 utf8_and_euc_tw \ ! utf_8_to_euc_tw UNICODE EUC_TW utf8_to_euc_tw utf8_and_euc_tw \ ! gb18030_to_utf_8 GB18030 UNICODE gb18030_to_utf8 utf8_and_gb18030 \ ! utf_8_to_gb18030 UNICODE GB18030 utf8_to_gb18030 utf8_and_gb18030 \ ! gbk_to_utf_8 GBK UNICODE gbk_to_utf8 utf8_and_gbk \ ! utf_8_to_gbk UNICODE GBK utf8_to_gbk utf8_and_gbk \ ! utf_8_to_iso_8859_2 UNICODE LATIN2 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_2_to_utf_8 LATIN2 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_3 UNICODE LATIN3 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_3_to_utf_8 LATIN3 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_4 UNICODE LATIN4 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_4_to_utf_8 LATIN4 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_9 UNICODE LATIN5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_9_to_utf_8 LATIN5 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_10 UNICODE LATIN6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_10_to_utf_8 LATIN6 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_13 UNICODE LATIN7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_13_to_utf_8 LATIN7 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_14 UNICODE LATIN8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_14_to_utf_8 LATIN8 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_15 UNICODE LATIN9 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_15_to_utf_8 LATIN9 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_16 UNICODE LATIN10 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_16_to_utf_8 LATIN10 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_5 UNICODE ISO-8859-5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_5_to_utf_8 ISO-8859-5 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_6 UNICODE ISO-8859-6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_6_to_utf_8 ISO-8859-6 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_7 UNICODE ISO-8859-7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_7_to_utf_8 ISO-8859-7 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_8 UNICODE ISO-8859-8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_8_to_utf_8 ISO-8859-8 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! iso_8859_1_to_utf_8 LATIN1 UNICODE iso8859_1_to_utf8 utf8_and_iso8859_1 \ ! utf_8_to_iso_8859_1 UNICODE LATIN1 utf8_to_iso8859_1 utf8_and_iso8859_1 \ ! johab_to_utf_8 JOHAB UNICODE johab_to_utf8 utf8_and_johab \ ! utf_8_to_johab UNICODE JOHAB utf8_to_johab utf8_and_johab \ ! sjis_to_utf_8 SJIS UNICODE sjis_to_utf8 utf8_and_sjis \ ! utf_8_to_sjis UNICODE SJIS utf8_to_sjis utf8_and_sjis \ ! tcvn_to_utf_8 TCVN UNICODE tcvn_to_utf8 utf8_and_tcvn \ ! utf_8_to_tcvn UNICODE TCVN utf8_to_tcvn utf8_and_tcvn \ ! uhc_to_utf_8 UHC UNICODE uhc_to_utf8 utf8_and_uhc \ ! utf_8_to_uhc UNICODE UHC utf8_to_uhc utf8_and_uhc \ ! utf_8_to_windows_1250 UNICODE WIN1250 utf_to_win1250 utf8_and_win1250 \ ! windows_1250_to_utf_8 WIN1250 UNICODE win1250_to_utf utf8_and_win1250 \ ! utf_8_to_windows_1256 UNICODE WIN1256 utf_to_win1256 utf8_and_win1256 \ ! windows_1256_to_utf_8 WIN1256 UNICODE win1256_to_utf utf8_and_win1256 \ ! utf_8_to_windows_874 UNICODE WIN874 utf_to_win874 utf8_and_win874 \ ! windows_874_to_utf_8 WIN874 UNICODE win874_to_utf utf8_and_win874 all: $(SQLSCRIPT) @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done --- 78,147 ---- mic_to_iso_8859_3 MULE_INTERNAL LATIN3 mic_to_latin3 latin_and_mic \ iso_8859_4_to_mic LATIN4 MULE_INTERNAL latin4_to_mic latin_and_mic \ mic_to_iso_8859_4 MULE_INTERNAL LATIN4 mic_to_latin4 latin_and_mic \ ! ascii_to_utf_8 SQL_ASCII UTF8 ascii_to_utf8 utf8_and_ascii \ ! utf_8_to_ascii UTF8 SQL_ASCII utf8_to_ascii utf8_and_ascii \ ! big5_to_utf_8 BIG5 UTF8 big5_to_utf8 utf8_and_big5 \ ! utf_8_to_big5 UTF8 BIG5 utf8_to_big5 utf8_and_big5 \ ! utf_8_to_koi8_r UTF8 KOI8R utf8_to_koi8r utf8_and_cyrillic \ ! koi8_r_to_utf_8 KOI8R UTF8 koi8r_to_utf8 utf8_and_cyrillic \ ! utf_8_to_windows_1251 UTF8 WIN1251 utf8_to_win1251 utf8_and_cyrillic \ ! windows_1251_to_utf_8 WIN1251 UTF8 win1251_to_utf8 utf8_and_cyrillic \ ! utf_8_to_windows_866 UTF8 WIN866 utf8_to_win866 utf8_and_cyrillic \ ! windows_866_to_utf_8 WIN866 UTF8 win866_to_utf8 utf8_and_cyrillic \ ! euc_cn_to_utf_8 EUC_CN UTF8 euc_cn_to_utf8 utf8_and_euc_cn \ ! utf_8_to_euc_cn UTF8 EUC_CN utf8_to_euc_cn utf8_and_euc_cn \ ! euc_jp_to_utf_8 EUC_JP UTF8 euc_jp_to_utf8 utf8_and_euc_jp \ ! utf_8_to_euc_jp UTF8 EUC_JP utf8_to_euc_jp utf8_and_euc_jp \ ! euc_kr_to_utf_8 EUC_KR UTF8 euc_kr_to_utf8 utf8_and_euc_kr \ ! utf_8_to_euc_kr UTF8 EUC_KR utf8_to_euc_kr utf8_and_euc_kr \ ! euc_tw_to_utf_8 EUC_TW UTF8 euc_tw_to_utf8 utf8_and_euc_tw \ ! utf_8_to_euc_tw UTF8 EUC_TW utf8_to_euc_tw utf8_and_euc_tw \ ! gb18030_to_utf_8 GB18030 UTF8 gb18030_to_utf8 utf8_and_gb18030 \ ! utf_8_to_gb18030 UTF8 GB18030 utf8_to_gb18030 utf8_and_gb18030 \ ! gbk_to_utf_8 GBK UTF8 gbk_to_utf8 utf8_and_gbk \ ! utf_8_to_gbk UTF8 GBK utf8_to_gbk utf8_and_gbk \ ! utf_8_to_iso_8859_2 UTF8 LATIN2 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_2_to_utf_8 LATIN2 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_3 UTF8 LATIN3 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_3_to_utf_8 LATIN3 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_4 UTF8 LATIN4 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_4_to_utf_8 LATIN4 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_9 UTF8 LATIN5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_9_to_utf_8 LATIN5 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_10 UTF8 LATIN6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_10_to_utf_8 LATIN6 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_13 UTF8 LATIN7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_13_to_utf_8 LATIN7 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_14 UTF8 LATIN8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_14_to_utf_8 LATIN8 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_15 UTF8 LATIN9 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_15_to_utf_8 LATIN9 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_16 UTF8 LATIN10 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_16_to_utf_8 LATIN10 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_5 UTF8 ISO-8859-5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_5_to_utf_8 ISO-8859-5 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_6 UTF8 ISO-8859-6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_6_to_utf_8 ISO-8859-6 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_7 UTF8 ISO-8859-7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_7_to_utf_8 ISO-8859-7 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_8 UTF8 ISO-8859-8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_8_to_utf_8 ISO-8859-8 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! iso_8859_1_to_utf_8 LATIN1 UTF8 iso8859_1_to_utf8 utf8_and_iso8859_1 \ ! utf_8_to_iso_8859_1 UTF8 LATIN1 utf8_to_iso8859_1 utf8_and_iso8859_1 \ ! johab_to_utf_8 JOHAB UTF8 johab_to_utf8 utf8_and_johab \ ! utf_8_to_johab UTF8 JOHAB utf8_to_johab utf8_and_johab \ ! sjis_to_utf_8 SJIS UTF8 sjis_to_utf8 utf8_and_sjis \ ! utf_8_to_sjis UTF8 SJIS utf8_to_sjis utf8_and_sjis \ ! win1258_to_utf_8 WIN1258 UTF8 win1258_to_utf8 utf8_and_win1258 \ ! utf_8_to_win1258 UTF8 WIN1258 utf8_to_win1258 utf8_and_win1258 \ ! uhc_to_utf_8 UHC UTF8 uhc_to_utf8 utf8_and_uhc \ ! utf_8_to_uhc UTF8 UHC utf8_to_uhc utf8_and_uhc \ ! utf_8_to_windows_1250 UTF8 WIN1250 utf_to_win1250 utf8_and_win1250 \ ! windows_1250_to_utf_8 WIN1250 UTF8 win1250_to_utf utf8_and_win1250 \ ! utf_8_to_windows_1256 UTF8 WIN1256 utf_to_win1256 utf8_and_win1256 \ ! windows_1256_to_utf_8 WIN1256 UTF8 win1256_to_utf utf8_and_win1256 \ ! utf_8_to_windows_874 UTF8 WIN874 utf_to_win874 utf8_and_win874 \ ! windows_874_to_utf_8 WIN874 UTF8 win874_to_utf utf8_and_win874 all: $(SQLSCRIPT) @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done Index: src/backend/utils/mb/conversion_procs/regress_prolog =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/regress_prolog,v retrieving revision 1.2 diff -c -c -r1.2 regress_prolog *** src/backend/utils/mb/conversion_procs/regress_prolog 4 Sep 2002 02:42:34 -0000 1.2 --- src/backend/utils/mb/conversion_procs/regress_prolog 27 Feb 2005 03:36:27 -0000 *************** *** 3,21 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- drop user defined conversion -- --- 3,21 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- drop user defined conversion -- Index: src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c,v retrieving revision 1.9 diff -c -c -r1.9 cyrillic_and_mic.c *** src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c 31 Dec 2004 22:01:48 -0000 1.9 --- src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c 27 Feb 2005 03:36:28 -0000 *************** *** 23,42 **** PG_FUNCTION_INFO_V1(mic_to_iso); PG_FUNCTION_INFO_V1(win1251_to_mic); PG_FUNCTION_INFO_V1(mic_to_win1251); ! PG_FUNCTION_INFO_V1(alt_to_mic); ! PG_FUNCTION_INFO_V1(mic_to_alt); PG_FUNCTION_INFO_V1(koi8r_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_koi8r); ! PG_FUNCTION_INFO_V1(koi8r_to_alt); ! PG_FUNCTION_INFO_V1(alt_to_koi8r); ! PG_FUNCTION_INFO_V1(alt_to_win1251); ! PG_FUNCTION_INFO_V1(win1251_to_alt); PG_FUNCTION_INFO_V1(iso_to_koi8r); PG_FUNCTION_INFO_V1(koi8r_to_iso); PG_FUNCTION_INFO_V1(iso_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_iso); ! PG_FUNCTION_INFO_V1(iso_to_alt); ! PG_FUNCTION_INFO_V1(alt_to_iso); extern Datum koi8r_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_koi8r(PG_FUNCTION_ARGS); --- 23,42 ---- PG_FUNCTION_INFO_V1(mic_to_iso); PG_FUNCTION_INFO_V1(win1251_to_mic); PG_FUNCTION_INFO_V1(mic_to_win1251); ! PG_FUNCTION_INFO_V1(win866_to_mic); ! PG_FUNCTION_INFO_V1(mic_to_win866); PG_FUNCTION_INFO_V1(koi8r_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_koi8r); ! PG_FUNCTION_INFO_V1(koi8r_to_win866); ! PG_FUNCTION_INFO_V1(win866_to_koi8r); ! PG_FUNCTION_INFO_V1(win866_to_win1251); ! PG_FUNCTION_INFO_V1(win1251_to_win866); PG_FUNCTION_INFO_V1(iso_to_koi8r); PG_FUNCTION_INFO_V1(koi8r_to_iso); PG_FUNCTION_INFO_V1(iso_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_iso); ! PG_FUNCTION_INFO_V1(iso_to_win866); ! PG_FUNCTION_INFO_V1(win866_to_iso); extern Datum koi8r_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_koi8r(PG_FUNCTION_ARGS); *************** *** 44,63 **** extern Datum mic_to_iso(PG_FUNCTION_ARGS); extern Datum win1251_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_win1251(PG_FUNCTION_ARGS); ! extern Datum alt_to_mic(PG_FUNCTION_ARGS); ! extern Datum mic_to_alt(PG_FUNCTION_ARGS); extern Datum koi8r_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum koi8r_to_alt(PG_FUNCTION_ARGS); ! extern Datum alt_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum alt_to_win1251(PG_FUNCTION_ARGS); ! extern Datum win1251_to_alt(PG_FUNCTION_ARGS); extern Datum iso_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_iso(PG_FUNCTION_ARGS); extern Datum iso_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_iso(PG_FUNCTION_ARGS); ! extern Datum iso_to_alt(PG_FUNCTION_ARGS); ! extern Datum alt_to_iso(PG_FUNCTION_ARGS); /* ---------- * conv_proc( --- 44,63 ---- extern Datum mic_to_iso(PG_FUNCTION_ARGS); extern Datum win1251_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_win1251(PG_FUNCTION_ARGS); ! extern Datum win866_to_mic(PG_FUNCTION_ARGS); ! extern Datum mic_to_win866(PG_FUNCTION_ARGS); extern Datum koi8r_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum koi8r_to_win866(PG_FUNCTION_ARGS); ! extern Datum win866_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum win866_to_win1251(PG_FUNCTION_ARGS); ! extern Datum win1251_to_win866(PG_FUNCTION_ARGS); extern Datum iso_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_iso(PG_FUNCTION_ARGS); extern Datum iso_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_iso(PG_FUNCTION_ARGS); ! extern Datum iso_to_win866(PG_FUNCTION_ARGS); ! extern Datum win866_to_iso(PG_FUNCTION_ARGS); /* ---------- * conv_proc( *************** *** 176,188 **** } Datum ! alt_to_mic(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL); Assert(len >= 0); --- 176,188 ---- } Datum ! win866_to_mic(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL); Assert(len >= 0); *************** *** 192,205 **** } Datum ! mic_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_MULE_INTERNAL); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); mic2alt(src, dest, len); --- 192,205 ---- } Datum ! mic_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_MULE_INTERNAL); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); mic2alt(src, dest, len); *************** *** 248,254 **** } Datum ! koi8r_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); --- 248,254 ---- } Datum ! koi8r_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); *************** *** 256,262 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_KOI8R); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 256,262 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_KOI8R); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 268,281 **** } Datum ! alt_to_koi8r(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_KOI8R); Assert(len >= 0); --- 268,281 ---- } Datum ! win866_to_koi8r(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_KOI8R); Assert(len >= 0); *************** *** 288,301 **** } Datum ! alt_to_win1251(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_WIN1251); Assert(len >= 0); --- 288,301 ---- } Datum ! win866_to_win1251(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_WIN1251); Assert(len >= 0); *************** *** 308,314 **** } Datum ! win1251_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); --- 308,314 ---- } Datum ! win1251_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); *************** *** 316,322 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_WIN1251); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 316,322 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_WIN1251); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 408,414 **** } Datum ! iso_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); --- 408,414 ---- } Datum ! iso_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); *************** *** 416,422 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 416,422 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 428,441 **** } Datum ! alt_to_iso(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5); Assert(len >= 0); --- 428,441 ---- } Datum ! win866_to_iso(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5); Assert(len >= 0); Index: src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_ascii.c *** src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c 31 Dec 2004 22:02:11 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ASCII <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ASCII <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_big5.c *** src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c 31 Dec 2004 22:02:13 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * BIG5 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * BIG5 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_cyrillic.c *** src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c 31 Dec 2004 22:02:14 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c 27 Feb 2005 03:36:28 -0000 *************** *** 25,39 **** PG_FUNCTION_INFO_V1(koi8r_to_utf8); PG_FUNCTION_INFO_V1(utf8_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_alt); ! PG_FUNCTION_INFO_V1(alt_to_utf8); extern Datum utf8_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_utf8(PG_FUNCTION_ARGS); extern Datum utf8_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_alt(PG_FUNCTION_ARGS); ! extern Datum alt_to_utf8(PG_FUNCTION_ARGS); /* ---------- * conv_proc( --- 25,39 ---- PG_FUNCTION_INFO_V1(koi8r_to_utf8); PG_FUNCTION_INFO_V1(utf8_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_win866); ! PG_FUNCTION_INFO_V1(win866_to_utf8); extern Datum utf8_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_utf8(PG_FUNCTION_ARGS); extern Datum utf8_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_win866(PG_FUNCTION_ARGS); ! extern Datum win866_to_utf8(PG_FUNCTION_ARGS); /* ---------- * conv_proc( *************** *** 115,128 **** } Datum ! utf8_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); UtfToLocal(src, dest, ULmap_ALT, --- 115,128 ---- } Datum ! utf8_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); UtfToLocal(src, dest, ULmap_ALT, *************** *** 132,149 **** } Datum ! alt_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapALT, ! sizeof(LUmapALT) / sizeof(pg_local_to_utf), PG_ALT, len); PG_RETURN_VOID(); } --- 132,149 ---- } Datum ! win866_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapALT, ! sizeof(LUmapALT) / sizeof(pg_local_to_utf), PG_WIN866, len); PG_RETURN_VOID(); } Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_cn.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c 31 Dec 2004 22:02:16 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_CN <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_CN <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_jp.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c 31 Dec 2004 22:02:17 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_JP <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_JP <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_kr.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c 31 Dec 2004 22:02:19 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_KR <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_KR <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_tw.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c 31 Dec 2004 22:02:20 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_TW <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_TW <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_gb18030.c *** src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c 31 Dec 2004 22:02:23 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * GB18030 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * GB18030 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_gbk.c *** src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c 31 Dec 2004 22:02:26 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * GBK <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * GBK <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c,v retrieving revision 1.11 diff -c -c -r1.11 utf8_and_iso8859.c *** src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c 31 Dec 2004 22:02:27 -0000 1.11 --- src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ISO 8859 2-16 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ISO 8859 2-16 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 61,68 **** typedef struct { pg_enc encoding; ! pg_local_to_utf *map1; /* to UTF-8 map name */ ! pg_utf_to_local *map2; /* from UTF-8 map name */ int size1; /* size of map1 */ int size2; /* size of map2 */ } pg_conv_map; --- 61,68 ---- typedef struct { pg_enc encoding; ! pg_local_to_utf *map1; /* to UTF8 map name */ ! pg_utf_to_local *map2; /* from UTF8 map name */ int size1; /* size of map1 */ int size2; /* size of map2 */ } pg_conv_map; *************** *** 74,80 **** {PG_EUC_KR}, /* EUC for Korean */ {PG_EUC_TW}, /* EUC for Taiwan */ {PG_JOHAB}, /* EUC for Korean JOHAB */ ! {PG_UTF8}, /* Unicode UTF-8 */ {PG_MULE_INTERNAL}, /* Mule internal code */ {PG_LATIN1}, /* ISO-8859-1 Latin 1 */ {PG_LATIN2, LUmapISO8859_2, ULmapISO8859_2, --- 74,80 ---- {PG_EUC_KR}, /* EUC for Korean */ {PG_EUC_TW}, /* EUC for Taiwan */ {PG_JOHAB}, /* EUC for Korean JOHAB */ ! {PG_UTF8}, /* Unicode UTF8 */ {PG_MULE_INTERNAL}, /* Mule internal code */ {PG_LATIN1}, /* ISO-8859-1 Latin 1 */ {PG_LATIN2, LUmapISO8859_2, ULmapISO8859_2, *************** *** 105,115 **** sizeof(LUmapISO8859_16) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_16) / sizeof(pg_utf_to_local)}, /* ISO-8859-16 Latin 10 */ {PG_WIN1256}, /* windows-1256 */ ! {PG_TCVN}, /* TCVN (Windows-1258) */ {PG_WIN874}, /* windows-874 */ {PG_KOI8R}, /* KOI8-R */ {PG_WIN1251}, /* windows-1251 (was: WIN) */ ! {PG_ALT}, /* (MS-DOS CP866) */ {PG_ISO_8859_5, LUmapISO8859_5, ULmapISO8859_5, sizeof(LUmapISO8859_5) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_5) / sizeof(pg_utf_to_local)}, /* ISO-8859-5 */ --- 105,115 ---- sizeof(LUmapISO8859_16) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_16) / sizeof(pg_utf_to_local)}, /* ISO-8859-16 Latin 10 */ {PG_WIN1256}, /* windows-1256 */ ! {PG_WIN1258}, /* Windows-1258 */ {PG_WIN874}, /* windows-874 */ {PG_KOI8R}, /* KOI8-R */ {PG_WIN1251}, /* windows-1251 (was: WIN) */ ! {PG_WIN866}, /* (MS-DOS CP866) */ {PG_ISO_8859_5, LUmapISO8859_5, ULmapISO8859_5, sizeof(LUmapISO8859_5) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_5) / sizeof(pg_utf_to_local)}, /* ISO-8859-5 */ Index: src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v retrieving revision 1.10 diff -c -c -r1.10 utf8_and_iso8859_1.c *** src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 31 Dec 2004 22:02:29 -0000 1.10 --- src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ISO8859_1 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ISO8859_1 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 84,90 **** len -= 2; } else if ((c & 0xe0) == 0xe0) ! elog(ERROR, "could not convert UTF-8 character 0x%04x to ISO8859-1", c); else { --- 84,90 ---- len -= 2; } else if ((c & 0xe0) == 0xe0) ! elog(ERROR, "could not convert UTF8 character 0x%04x to ISO8859-1", c); else { Index: src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_johab.c *** src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 31 Dec 2004 22:02:31 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * JOHAB <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * JOHAB <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_sjis.c *** src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 31 Dec 2004 22:02:33 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * SJIS <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * SJIS <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_tcvn.c *** src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c 31 Dec 2004 22:02:35 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * TCVN <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * TCVN <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 17,27 **** #include "../../Unicode/tcvn_to_utf8.map" #include "../../Unicode/utf8_to_tcvn.map" ! PG_FUNCTION_INFO_V1(tcvn_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_tcvn); ! extern Datum tcvn_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_tcvn(PG_FUNCTION_ARGS); /* ---------- * conv_proc( --- 17,27 ---- #include "../../Unicode/tcvn_to_utf8.map" #include "../../Unicode/utf8_to_tcvn.map" ! PG_FUNCTION_INFO_V1(win1258_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_win1258); ! extern Datum win1258_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_win1258(PG_FUNCTION_ARGS); /* ---------- * conv_proc( *************** *** 34,64 **** * ---------- */ Datum ! tcvn_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_TCVN); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapTCVN, ! sizeof(LUmapTCVN) / sizeof(pg_local_to_utf), PG_TCVN, len); PG_RETURN_VOID(); } Datum ! utf8_to_tcvn(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_TCVN); Assert(len >= 0); UtfToLocal(src, dest, ULmapTCVN, --- 34,64 ---- * ---------- */ Datum ! win1258_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN1258); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapTCVN, ! sizeof(LUmapTCVN) / sizeof(pg_local_to_utf), PG_WIN1258, len); PG_RETURN_VOID(); } Datum ! utf8_to_win1258(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_WIN1258); Assert(len >= 0); UtfToLocal(src, dest, ULmapTCVN, Index: src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_uhc.c *** src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 31 Dec 2004 22:02:36 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * UHC <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * UHC <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win1250.c *** src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c 31 Dec 2004 22:02:38 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN1250 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN1250 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win1256.c *** src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c 31 Dec 2004 22:02:39 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN1256 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN1256 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win874.c *** src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c 31 Dec 2004 22:02:41 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c 27 Feb 2005 03:36:28 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN874 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN874 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/bin/initdb/initdb.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/initdb/initdb.c,v retrieving revision 1.76 diff -c -c -r1.76 initdb.c *** src/bin/initdb/initdb.c 26 Feb 2005 18:43:34 -0000 1.76 --- src/bin/initdb/initdb.c 27 Feb 2005 03:36:30 -0000 *************** *** 723,729 **** {PG_JOHAB, "???"}, #endif ! {PG_UTF8, "UTF-8"}, {PG_UTF8, "utf8"}, {PG_LATIN1, "ISO-8859-1"}, --- 723,729 ---- {PG_JOHAB, "???"}, #endif ! {PG_UTF8, "UTF8"}, {PG_UTF8, "utf8"}, {PG_LATIN1, "ISO-8859-1"}, *************** *** 767,779 **** {PG_LATIN10, "iso885916"}, {PG_WIN1256, "CP1256"}, ! {PG_TCVN, "CP1258"}, #ifdef NOT_VERIFIED {PG_WIN874, "???"}, #endif {PG_KOI8R, "KOI8-R"}, {PG_WIN1251, "CP1251"}, ! {PG_ALT, "CP866"}, {PG_ISO_8859_5, "ISO-8859-5"}, {PG_ISO_8859_5, "ISO8859-5"}, --- 767,779 ---- {PG_LATIN10, "iso885916"}, {PG_WIN1256, "CP1256"}, ! {PG_WIN1258, "CP1258"}, #ifdef NOT_VERIFIED {PG_WIN874, "???"}, #endif {PG_KOI8R, "KOI8-R"}, {PG_WIN1251, "CP1251"}, ! {PG_WIN866, "CP866"}, {PG_ISO_8859_5, "ISO-8859-5"}, {PG_ISO_8859_5, "ISO8859-5"}, Index: src/include/mb/pg_wchar.h =================================================================== RCS file: /cvsroot/pgsql/src/include/mb/pg_wchar.h,v retrieving revision 1.56 diff -c -c -r1.56 pg_wchar.h *** src/include/mb/pg_wchar.h 4 Dec 2004 18:19:33 -0000 1.56 --- src/include/mb/pg_wchar.h 27 Feb 2005 03:36:31 -0000 *************** *** 155,161 **** PG_EUC_KR, /* EUC for Korean */ PG_EUC_TW, /* EUC for Taiwan */ PG_JOHAB, /* EUC for Korean JOHAB */ ! PG_UTF8, /* Unicode UTF-8 */ PG_MULE_INTERNAL, /* Mule internal code */ PG_LATIN1, /* ISO-8859-1 Latin 1 */ PG_LATIN2, /* ISO-8859-2 Latin 2 */ --- 155,161 ---- PG_EUC_KR, /* EUC for Korean */ PG_EUC_TW, /* EUC for Taiwan */ PG_JOHAB, /* EUC for Korean JOHAB */ ! PG_UTF8, /* Unicode UTF8 */ PG_MULE_INTERNAL, /* Mule internal code */ PG_LATIN1, /* ISO-8859-1 Latin 1 */ PG_LATIN2, /* ISO-8859-2 Latin 2 */ *************** *** 168,178 **** PG_LATIN9, /* ISO-8859-15 Latin9 */ PG_LATIN10, /* ISO-8859-16 Latin10 */ PG_WIN1256, /* windows-1256 */ ! PG_TCVN, /* TCVN (Windows-1258) */ PG_WIN874, /* windows-874 */ PG_KOI8R, /* KOI8-R */ PG_WIN1251, /* windows-1251 (was: WIN) */ - PG_ALT, /* (MS-DOS CP866) */ PG_ISO_8859_5, /* ISO-8859-5 */ PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_7, /* ISO-8859-7 */ --- 168,178 ---- PG_LATIN9, /* ISO-8859-15 Latin9 */ PG_LATIN10, /* ISO-8859-16 Latin10 */ PG_WIN1256, /* windows-1256 */ ! PG_WIN1258, /* Windows-1258 */ ! PG_WIN866, /* (MS-DOS CP866) */ PG_WIN874, /* windows-874 */ PG_KOI8R, /* KOI8-R */ PG_WIN1251, /* windows-1251 (was: WIN) */ PG_ISO_8859_5, /* ISO-8859-5 */ PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_7, /* ISO-8859-7 */ *************** *** 263,283 **** extern pg_wchar_tbl pg_wchar_table[]; /* ! * UTF-8 to local code conversion map */ typedef struct { ! unsigned int utf; /* UTF-8 */ unsigned int code; /* local code */ } pg_utf_to_local; /* ! * local code to UTF-8 conversion map */ typedef struct { unsigned int code; /* local code */ ! unsigned int utf; /* UTF-8 */ } pg_local_to_utf; extern int pg_mb2wchar(const unsigned char *from, pg_wchar *to); --- 263,283 ---- extern pg_wchar_tbl pg_wchar_table[]; /* ! * UTF8 to local code conversion map */ typedef struct { ! unsigned int utf; /* UTF8 */ unsigned int code; /* local code */ } pg_utf_to_local; /* ! * local code to UTF8 conversion map */ typedef struct { unsigned int code; /* local code */ ! unsigned int utf; /* UTF8 */ } pg_local_to_utf; extern int pg_mb2wchar(const unsigned char *from, pg_wchar *to); Index: src/test/mb/mbregress.sh =================================================================== RCS file: /cvsroot/pgsql/src/test/mb/mbregress.sh,v retrieving revision 1.7 diff -c -c -r1.7 mbregress.sh *** src/test/mb/mbregress.sh 29 Nov 2003 19:52:14 -0000 1.7 --- src/test/mb/mbregress.sh 27 Feb 2005 03:36:31 -0000 *************** *** 15,24 **** fi dropdb unitest ! createdb -E UNICODE unitest PSQL="psql -n -e -q" ! tests="euc_jp sjis euc_kr euc_cn euc_tw big5 unicode mule_internal" unset PGCLIENTENCODING for i in $tests do --- 15,24 ---- fi dropdb unitest ! createdb -E UTF8 unitest PSQL="psql -n -e -q" ! tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal" unset PGCLIENTENCODING for i in $tests do Index: src/test/regress/expected/conversion.out =================================================================== RCS file: /cvsroot/pgsql/src/test/regress/expected/conversion.out,v retrieving revision 1.9 diff -c -c -r1.9 conversion.out *** src/test/regress/expected/conversion.out 21 Nov 2003 22:32:49 -0000 1.9 --- src/test/regress/expected/conversion.out 27 Feb 2005 03:36:32 -0000 *************** *** 3,23 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; ERROR: conversion "myconv" already exists -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; ! ERROR: default conversion for LATIN1 to UNICODE already exists -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; ERROR: conversion "myconv_bad" does not exist --- 3,23 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; ERROR: conversion "myconv" already exists -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; ! ERROR: default conversion for LATIN1 to UTF8 already exists -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; ERROR: conversion "myconv_bad" does not exist *************** *** 134,160 **** foo (1 row) ! -- ALT --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL'); convert --------- foo (1 row) ! -- MULE_INTERNAL --> ALT SELECT CONVERT('foo' USING mic_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT'); convert --------- foo --- 134,160 ---- foo (1 row) ! -- WIN866 --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'MULE_INTERNAL'); convert --------- foo (1 row) ! -- MULE_INTERNAL --> WIN866 SELECT CONVERT('foo' USING mic_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN866'); convert --------- foo *************** *** 186,238 **** foo (1 row) ! -- KOI8R --> ALT SELECT CONVERT('foo' USING koi8_r_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'ALT'); convert --------- foo (1 row) ! -- ALT --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'KOI8R'); convert --------- foo (1 row) ! -- ALT --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> ALT SELECT CONVERT('foo' USING windows_1251_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'ALT'); convert --------- foo --- 186,238 ---- foo (1 row) ! -- KOI8R --> WIN866 SELECT CONVERT('foo' USING koi8_r_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'KOI8R'); convert --------- foo (1 row) ! -- WIN866 --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> WIN866 SELECT CONVERT('foo' USING windows_1251_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'WIN866'); convert --------- foo *************** *** 290,316 **** foo (1 row) ! -- ISO-8859-5 --> ALT SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'ALT'); convert --------- foo (1 row) ! -- ALT --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'ISO-8859-5'); convert --------- foo --- 290,316 ---- foo (1 row) ! -- ISO-8859-5 --> WIN866 SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'ISO-8859-5'); convert --------- foo *************** *** 680,1512 **** foo (1 row) ! -- SQL_ASCII --> UNICODE SELECT CONVERT('foo' USING ascii_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SQL_ASCII', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'SQL_ASCII'); convert --------- foo (1 row) ! -- BIG5 --> UNICODE SELECT CONVERT('foo' USING big5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'BIG5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'BIG5'); convert --------- foo (1 row) ! -- UNICODE --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'KOI8R'); convert --------- foo (1 row) ! -- KOI8R --> UNICODE SELECT CONVERT('foo' USING koi8_r_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> UNICODE SELECT CONVERT('foo' USING windows_1251_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ALT SELECT CONVERT('foo' USING utf_8_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ALT'); convert --------- foo (1 row) ! -- ALT --> UNICODE SELECT CONVERT('foo' USING windows_866_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'UNICODE'); convert --------- foo (1 row) ! -- EUC_CN --> UNICODE SELECT CONVERT('foo' USING euc_cn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_CN', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_CN'); convert --------- foo (1 row) ! -- EUC_JP --> UNICODE SELECT CONVERT('foo' USING euc_jp_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_JP', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_JP'); convert --------- foo (1 row) ! -- EUC_KR --> UNICODE SELECT CONVERT('foo' USING euc_kr_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_KR', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_KR'); convert --------- foo (1 row) ! -- EUC_TW --> UNICODE SELECT CONVERT('foo' USING euc_tw_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_TW', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_TW'); convert --------- foo (1 row) ! -- GB18030 --> UNICODE SELECT CONVERT('foo' USING gb18030_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GB18030', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'GB18030'); convert --------- foo (1 row) ! -- GBK --> UNICODE SELECT CONVERT('foo' USING gbk_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GBK', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'GBK'); convert --------- foo (1 row) ! -- UNICODE --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN2'); convert --------- foo (1 row) ! -- LATIN2 --> UNICODE SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN2', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN3'); convert --------- foo (1 row) ! -- LATIN3 --> UNICODE SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN3', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN4'); convert --------- foo (1 row) ! -- LATIN4 --> UNICODE SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN4', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN5'); convert --------- foo (1 row) ! -- LATIN5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN6'); convert --------- foo (1 row) ! -- LATIN6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN6', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN7'); convert --------- foo (1 row) ! -- LATIN7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN7', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN8'); convert --------- foo (1 row) ! -- LATIN8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN8', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN9'); convert --------- foo (1 row) ! -- LATIN9 --> UNICODE SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN9', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN10'); convert --------- foo (1 row) ! -- LATIN10 --> UNICODE SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN10', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-5'); convert --------- foo (1 row) ! -- ISO-8859-5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-6'); convert --------- foo (1 row) ! -- ISO-8859-6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-6', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-7'); convert --------- foo (1 row) ! -- ISO-8859-7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-7', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-8'); convert --------- foo (1 row) ! -- ISO-8859-8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-8', 'UNICODE'); convert --------- foo (1 row) ! -- LATIN1 --> UNICODE SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN1', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN1'); convert --------- foo (1 row) ! -- JOHAB --> UNICODE SELECT CONVERT('foo' USING johab_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'JOHAB', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'JOHAB'); convert --------- foo (1 row) ! -- SJIS --> UNICODE SELECT CONVERT('foo' USING sjis_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SJIS', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'SJIS'); convert --------- foo (1 row) ! -- TCVN --> UNICODE ! SELECT CONVERT('foo' USING tcvn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'TCVN', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> TCVN ! SELECT CONVERT('foo' USING utf_8_to_tcvn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'TCVN'); convert --------- foo (1 row) ! -- UHC --> UNICODE SELECT CONVERT('foo' USING uhc_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UHC', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'UHC'); convert --------- foo (1 row) ! -- UNICODE --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1250'); convert --------- foo (1 row) ! -- WIN1250 --> UNICODE SELECT CONVERT('foo' USING windows_1250_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1250', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1256'); convert --------- foo (1 row) ! -- WIN1256 --> UNICODE SELECT CONVERT('foo' USING windows_1256_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1256', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN874'); convert --------- foo (1 row) ! -- WIN874 --> UNICODE SELECT CONVERT('foo' USING windows_874_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN874', 'UNICODE'); convert --------- foo --- 680,1512 ---- foo (1 row) ! -- SQL_ASCII --> UTF8 SELECT CONVERT('foo' USING ascii_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SQL_ASCII', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'SQL_ASCII'); convert --------- foo (1 row) ! -- BIG5 --> UTF8 SELECT CONVERT('foo' USING big5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'BIG5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'BIG5'); convert --------- foo (1 row) ! -- UTF8 --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'KOI8R'); convert --------- foo (1 row) ! -- KOI8R --> UTF8 SELECT CONVERT('foo' USING koi8_r_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> UTF8 SELECT CONVERT('foo' USING windows_1251_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN866 SELECT CONVERT('foo' USING utf_8_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> UTF8 SELECT CONVERT('foo' USING windows_866_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'UTF8'); convert --------- foo (1 row) ! -- EUC_CN --> UTF8 SELECT CONVERT('foo' USING euc_cn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_CN', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_CN'); convert --------- foo (1 row) ! -- EUC_JP --> UTF8 SELECT CONVERT('foo' USING euc_jp_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_JP', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_JP'); convert --------- foo (1 row) ! -- EUC_KR --> UTF8 SELECT CONVERT('foo' USING euc_kr_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_KR', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_KR'); convert --------- foo (1 row) ! -- EUC_TW --> UTF8 SELECT CONVERT('foo' USING euc_tw_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_TW', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_TW'); convert --------- foo (1 row) ! -- GB18030 --> UTF8 SELECT CONVERT('foo' USING gb18030_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GB18030', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'GB18030'); convert --------- foo (1 row) ! -- GBK --> UTF8 SELECT CONVERT('foo' USING gbk_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GBK', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'GBK'); convert --------- foo (1 row) ! -- UTF8 --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN2'); convert --------- foo (1 row) ! -- LATIN2 --> UTF8 SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN2', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN3'); convert --------- foo (1 row) ! -- LATIN3 --> UTF8 SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN3', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN4'); convert --------- foo (1 row) ! -- LATIN4 --> UTF8 SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN4', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN5'); convert --------- foo (1 row) ! -- LATIN5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN6'); convert --------- foo (1 row) ! -- LATIN6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN6', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN7'); convert --------- foo (1 row) ! -- LATIN7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN7', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN8'); convert --------- foo (1 row) ! -- LATIN8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN8', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN9'); convert --------- foo (1 row) ! -- LATIN9 --> UTF8 SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN9', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN10'); convert --------- foo (1 row) ! -- LATIN10 --> UTF8 SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN10', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-5'); convert --------- foo (1 row) ! -- ISO-8859-5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-6'); convert --------- foo (1 row) ! -- ISO-8859-6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-6', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-7'); convert --------- foo (1 row) ! -- ISO-8859-7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-7', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-8'); convert --------- foo (1 row) ! -- ISO-8859-8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-8', 'UTF8'); convert --------- foo (1 row) ! -- LATIN1 --> UTF8 SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN1', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN1'); convert --------- foo (1 row) ! -- JOHAB --> UTF8 SELECT CONVERT('foo' USING johab_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'JOHAB', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'JOHAB'); convert --------- foo (1 row) ! -- SJIS --> UTF8 SELECT CONVERT('foo' USING sjis_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SJIS', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'SJIS'); convert --------- foo (1 row) ! -- WIN1258 --> UTF8 ! SELECT CONVERT('foo' USING win1258_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1258', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1258 ! SELECT CONVERT('foo' USING utf_8_to_win1258); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1258'); convert --------- foo (1 row) ! -- UHC --> UTF8 SELECT CONVERT('foo' USING uhc_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UHC', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'UHC'); convert --------- foo (1 row) ! -- UTF8 --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1250'); convert --------- foo (1 row) ! -- WIN1250 --> UTF8 SELECT CONVERT('foo' USING windows_1250_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1250', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1256'); convert --------- foo (1 row) ! -- WIN1256 --> UTF8 SELECT CONVERT('foo' USING windows_1256_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1256', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN874'); convert --------- foo (1 row) ! -- WIN874 --> UTF8 SELECT CONVERT('foo' USING windows_874_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN874', 'UTF8'); convert --------- foo Index: src/test/regress/sql/conversion.sql =================================================================== RCS file: /cvsroot/pgsql/src/test/regress/sql/conversion.sql,v retrieving revision 1.6 diff -c -c -r1.6 conversion.sql *** src/test/regress/sql/conversion.sql 21 Nov 2003 22:32:49 -0000 1.6 --- src/test/regress/sql/conversion.sql 27 Feb 2005 03:36:32 -0000 *************** *** 3,21 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; COMMENT ON CONVERSION myconv IS 'bar'; --- 3,21 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; COMMENT ON CONVERSION myconv IS 'bar'; *************** *** 51,80 **** -- MULE_INTERNAL --> WIN1251 SELECT CONVERT('foo' USING mic_to_windows_1251); SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251'); ! -- ALT --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); ! SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL'); ! -- MULE_INTERNAL --> ALT SELECT CONVERT('foo' USING mic_to_windows_866); ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT'); -- KOI8R --> WIN1251 SELECT CONVERT('foo' USING koi8_r_to_windows_1251); SELECT CONVERT('foo', 'KOI8R', 'WIN1251'); -- WIN1251 --> KOI8R SELECT CONVERT('foo' USING windows_1251_to_koi8_r); SELECT CONVERT('foo', 'WIN1251', 'KOI8R'); ! -- KOI8R --> ALT SELECT CONVERT('foo' USING koi8_r_to_windows_866); ! SELECT CONVERT('foo', 'KOI8R', 'ALT'); ! -- ALT --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); ! SELECT CONVERT('foo', 'ALT', 'KOI8R'); ! -- ALT --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); ! SELECT CONVERT('foo', 'ALT', 'WIN1251'); ! -- WIN1251 --> ALT SELECT CONVERT('foo' USING windows_1251_to_windows_866); ! SELECT CONVERT('foo', 'WIN1251', 'ALT'); -- ISO-8859-5 --> KOI8R SELECT CONVERT('foo' USING iso_8859_5_to_koi8_r); SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R'); --- 51,80 ---- -- MULE_INTERNAL --> WIN1251 SELECT CONVERT('foo' USING mic_to_windows_1251); SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251'); ! -- WIN866 --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); ! SELECT CONVERT('foo', 'WIN866', 'MULE_INTERNAL'); ! -- MULE_INTERNAL --> WIN866 SELECT CONVERT('foo' USING mic_to_windows_866); ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN866'); -- KOI8R --> WIN1251 SELECT CONVERT('foo' USING koi8_r_to_windows_1251); SELECT CONVERT('foo', 'KOI8R', 'WIN1251'); -- WIN1251 --> KOI8R SELECT CONVERT('foo' USING windows_1251_to_koi8_r); SELECT CONVERT('foo', 'WIN1251', 'KOI8R'); ! -- KOI8R --> WIN866 SELECT CONVERT('foo' USING koi8_r_to_windows_866); ! SELECT CONVERT('foo', 'KOI8R', 'WIN866'); ! -- WIN866 --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); ! SELECT CONVERT('foo', 'WIN866', 'KOI8R'); ! -- WIN866 --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); ! SELECT CONVERT('foo', 'WIN866', 'WIN1251'); ! -- WIN1251 --> WIN866 SELECT CONVERT('foo' USING windows_1251_to_windows_866); ! SELECT CONVERT('foo', 'WIN1251', 'WIN866'); -- ISO-8859-5 --> KOI8R SELECT CONVERT('foo' USING iso_8859_5_to_koi8_r); SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R'); *************** *** 87,98 **** -- WIN1251 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_1251_to_iso_8859_5); SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5'); ! -- ISO-8859-5 --> ALT SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); ! SELECT CONVERT('foo', 'ISO-8859-5', 'ALT'); ! -- ALT --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); ! SELECT CONVERT('foo', 'ALT', 'ISO-8859-5'); -- EUC_CN --> MULE_INTERNAL SELECT CONVERT('foo' USING euc_cn_to_mic); SELECT CONVERT('foo', 'EUC_CN', 'MULE_INTERNAL'); --- 87,98 ---- -- WIN1251 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_1251_to_iso_8859_5); SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5'); ! -- ISO-8859-5 --> WIN866 SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); ! SELECT CONVERT('foo', 'ISO-8859-5', 'WIN866'); ! -- WIN866 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); ! SELECT CONVERT('foo', 'WIN866', 'ISO-8859-5'); -- EUC_CN --> MULE_INTERNAL SELECT CONVERT('foo' USING euc_cn_to_mic); SELECT CONVERT('foo', 'EUC_CN', 'MULE_INTERNAL'); *************** *** 177,374 **** -- MULE_INTERNAL --> LATIN4 SELECT CONVERT('foo' USING mic_to_iso_8859_4); SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN4'); ! -- SQL_ASCII --> UNICODE SELECT CONVERT('foo' USING ascii_to_utf_8); ! SELECT CONVERT('foo', 'SQL_ASCII', 'UNICODE'); ! -- UNICODE --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); ! SELECT CONVERT('foo', 'UNICODE', 'SQL_ASCII'); ! -- BIG5 --> UNICODE SELECT CONVERT('foo' USING big5_to_utf_8); ! SELECT CONVERT('foo', 'BIG5', 'UNICODE'); ! -- UNICODE --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); ! SELECT CONVERT('foo', 'UNICODE', 'BIG5'); ! -- UNICODE --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); ! SELECT CONVERT('foo', 'UNICODE', 'KOI8R'); ! -- KOI8R --> UNICODE SELECT CONVERT('foo' USING koi8_r_to_utf_8); ! SELECT CONVERT('foo', 'KOI8R', 'UNICODE'); ! -- UNICODE --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1251'); ! -- WIN1251 --> UNICODE SELECT CONVERT('foo' USING windows_1251_to_utf_8); ! SELECT CONVERT('foo', 'WIN1251', 'UNICODE'); ! -- UNICODE --> ALT SELECT CONVERT('foo' USING utf_8_to_windows_866); ! SELECT CONVERT('foo', 'UNICODE', 'ALT'); ! -- ALT --> UNICODE SELECT CONVERT('foo' USING windows_866_to_utf_8); ! SELECT CONVERT('foo', 'ALT', 'UNICODE'); ! -- EUC_CN --> UNICODE SELECT CONVERT('foo' USING euc_cn_to_utf_8); ! SELECT CONVERT('foo', 'EUC_CN', 'UNICODE'); ! -- UNICODE --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_CN'); ! -- EUC_JP --> UNICODE SELECT CONVERT('foo' USING euc_jp_to_utf_8); ! SELECT CONVERT('foo', 'EUC_JP', 'UNICODE'); ! -- UNICODE --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_JP'); ! -- EUC_KR --> UNICODE SELECT CONVERT('foo' USING euc_kr_to_utf_8); ! SELECT CONVERT('foo', 'EUC_KR', 'UNICODE'); ! -- UNICODE --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_KR'); ! -- EUC_TW --> UNICODE SELECT CONVERT('foo' USING euc_tw_to_utf_8); ! SELECT CONVERT('foo', 'EUC_TW', 'UNICODE'); ! -- UNICODE --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_TW'); ! -- GB18030 --> UNICODE SELECT CONVERT('foo' USING gb18030_to_utf_8); ! SELECT CONVERT('foo', 'GB18030', 'UNICODE'); ! -- UNICODE --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); ! SELECT CONVERT('foo', 'UNICODE', 'GB18030'); ! -- GBK --> UNICODE SELECT CONVERT('foo' USING gbk_to_utf_8); ! SELECT CONVERT('foo', 'GBK', 'UNICODE'); ! -- UNICODE --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); ! SELECT CONVERT('foo', 'UNICODE', 'GBK'); ! -- UNICODE --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN2'); ! -- LATIN2 --> UNICODE SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); ! SELECT CONVERT('foo', 'LATIN2', 'UNICODE'); ! -- UNICODE --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN3'); ! -- LATIN3 --> UNICODE SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); ! SELECT CONVERT('foo', 'LATIN3', 'UNICODE'); ! -- UNICODE --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN4'); ! -- LATIN4 --> UNICODE SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); ! SELECT CONVERT('foo', 'LATIN4', 'UNICODE'); ! -- UNICODE --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN5'); ! -- LATIN5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); ! SELECT CONVERT('foo', 'LATIN5', 'UNICODE'); ! -- UNICODE --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN6'); ! -- LATIN6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); ! SELECT CONVERT('foo', 'LATIN6', 'UNICODE'); ! -- UNICODE --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN7'); ! -- LATIN7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); ! SELECT CONVERT('foo', 'LATIN7', 'UNICODE'); ! -- UNICODE --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN8'); ! -- LATIN8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); ! SELECT CONVERT('foo', 'LATIN8', 'UNICODE'); ! -- UNICODE --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN9'); ! -- LATIN9 --> UNICODE SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); ! SELECT CONVERT('foo', 'LATIN9', 'UNICODE'); ! -- UNICODE --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN10'); ! -- LATIN10 --> UNICODE SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); ! SELECT CONVERT('foo', 'LATIN10', 'UNICODE'); ! -- UNICODE --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-5'); ! -- ISO-8859-5 --> UNICODE SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-5', 'UNICODE'); ! -- UNICODE --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-6'); ! -- ISO-8859-6 --> UNICODE SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-6', 'UNICODE'); ! -- UNICODE --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-7'); ! -- ISO-8859-7 --> UNICODE SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-7', 'UNICODE'); ! -- UNICODE --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-8'); ! -- ISO-8859-8 --> UNICODE SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-8', 'UNICODE'); ! -- LATIN1 --> UNICODE SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); ! SELECT CONVERT('foo', 'LATIN1', 'UNICODE'); ! -- UNICODE --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN1'); ! -- JOHAB --> UNICODE SELECT CONVERT('foo' USING johab_to_utf_8); ! SELECT CONVERT('foo', 'JOHAB', 'UNICODE'); ! -- UNICODE --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); ! SELECT CONVERT('foo', 'UNICODE', 'JOHAB'); ! -- SJIS --> UNICODE SELECT CONVERT('foo' USING sjis_to_utf_8); ! SELECT CONVERT('foo', 'SJIS', 'UNICODE'); ! -- UNICODE --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); ! SELECT CONVERT('foo', 'UNICODE', 'SJIS'); ! -- TCVN --> UNICODE ! SELECT CONVERT('foo' USING tcvn_to_utf_8); ! SELECT CONVERT('foo', 'TCVN', 'UNICODE'); ! -- UNICODE --> TCVN ! SELECT CONVERT('foo' USING utf_8_to_tcvn); ! SELECT CONVERT('foo', 'UNICODE', 'TCVN'); ! -- UHC --> UNICODE SELECT CONVERT('foo' USING uhc_to_utf_8); ! SELECT CONVERT('foo', 'UHC', 'UNICODE'); ! -- UNICODE --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); ! SELECT CONVERT('foo', 'UNICODE', 'UHC'); ! -- UNICODE --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1250'); ! -- WIN1250 --> UNICODE SELECT CONVERT('foo' USING windows_1250_to_utf_8); ! SELECT CONVERT('foo', 'WIN1250', 'UNICODE'); ! -- UNICODE --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1256'); ! -- WIN1256 --> UNICODE SELECT CONVERT('foo' USING windows_1256_to_utf_8); ! SELECT CONVERT('foo', 'WIN1256', 'UNICODE'); ! -- UNICODE --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); ! SELECT CONVERT('foo', 'UNICODE', 'WIN874'); ! -- WIN874 --> UNICODE SELECT CONVERT('foo' USING windows_874_to_utf_8); ! SELECT CONVERT('foo', 'WIN874', 'UNICODE'); -- -- return to the super user -- --- 177,374 ---- -- MULE_INTERNAL --> LATIN4 SELECT CONVERT('foo' USING mic_to_iso_8859_4); SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN4'); ! -- SQL_ASCII --> UTF8 SELECT CONVERT('foo' USING ascii_to_utf_8); ! SELECT CONVERT('foo', 'SQL_ASCII', 'UTF8'); ! -- UTF8 --> SQL_ASCII SELECT CONVERT('foo' USING utf_8_to_ascii); ! SELECT CONVERT('foo', 'UTF8', 'SQL_ASCII'); ! -- BIG5 --> UTF8 SELECT CONVERT('foo' USING big5_to_utf_8); ! SELECT CONVERT('foo', 'BIG5', 'UTF8'); ! -- UTF8 --> BIG5 SELECT CONVERT('foo' USING utf_8_to_big5); ! SELECT CONVERT('foo', 'UTF8', 'BIG5'); ! -- UTF8 --> KOI8R SELECT CONVERT('foo' USING utf_8_to_koi8_r); ! SELECT CONVERT('foo', 'UTF8', 'KOI8R'); ! -- KOI8R --> UTF8 SELECT CONVERT('foo' USING koi8_r_to_utf_8); ! SELECT CONVERT('foo', 'KOI8R', 'UTF8'); ! -- UTF8 --> WIN1251 SELECT CONVERT('foo' USING utf_8_to_windows_1251); ! SELECT CONVERT('foo', 'UTF8', 'WIN1251'); ! -- WIN1251 --> UTF8 SELECT CONVERT('foo' USING windows_1251_to_utf_8); ! SELECT CONVERT('foo', 'WIN1251', 'UTF8'); ! -- UTF8 --> WIN866 SELECT CONVERT('foo' USING utf_8_to_windows_866); ! SELECT CONVERT('foo', 'UTF8', 'WIN866'); ! -- WIN866 --> UTF8 SELECT CONVERT('foo' USING windows_866_to_utf_8); ! SELECT CONVERT('foo', 'WIN866', 'UTF8'); ! -- EUC_CN --> UTF8 SELECT CONVERT('foo' USING euc_cn_to_utf_8); ! SELECT CONVERT('foo', 'EUC_CN', 'UTF8'); ! -- UTF8 --> EUC_CN SELECT CONVERT('foo' USING utf_8_to_euc_cn); ! SELECT CONVERT('foo', 'UTF8', 'EUC_CN'); ! -- EUC_JP --> UTF8 SELECT CONVERT('foo' USING euc_jp_to_utf_8); ! SELECT CONVERT('foo', 'EUC_JP', 'UTF8'); ! -- UTF8 --> EUC_JP SELECT CONVERT('foo' USING utf_8_to_euc_jp); ! SELECT CONVERT('foo', 'UTF8', 'EUC_JP'); ! -- EUC_KR --> UTF8 SELECT CONVERT('foo' USING euc_kr_to_utf_8); ! SELECT CONVERT('foo', 'EUC_KR', 'UTF8'); ! -- UTF8 --> EUC_KR SELECT CONVERT('foo' USING utf_8_to_euc_kr); ! SELECT CONVERT('foo', 'UTF8', 'EUC_KR'); ! -- EUC_TW --> UTF8 SELECT CONVERT('foo' USING euc_tw_to_utf_8); ! SELECT CONVERT('foo', 'EUC_TW', 'UTF8'); ! -- UTF8 --> EUC_TW SELECT CONVERT('foo' USING utf_8_to_euc_tw); ! SELECT CONVERT('foo', 'UTF8', 'EUC_TW'); ! -- GB18030 --> UTF8 SELECT CONVERT('foo' USING gb18030_to_utf_8); ! SELECT CONVERT('foo', 'GB18030', 'UTF8'); ! -- UTF8 --> GB18030 SELECT CONVERT('foo' USING utf_8_to_gb18030); ! SELECT CONVERT('foo', 'UTF8', 'GB18030'); ! -- GBK --> UTF8 SELECT CONVERT('foo' USING gbk_to_utf_8); ! SELECT CONVERT('foo', 'GBK', 'UTF8'); ! -- UTF8 --> GBK SELECT CONVERT('foo' USING utf_8_to_gbk); ! SELECT CONVERT('foo', 'UTF8', 'GBK'); ! -- UTF8 --> LATIN2 SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); ! SELECT CONVERT('foo', 'UTF8', 'LATIN2'); ! -- LATIN2 --> UTF8 SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); ! SELECT CONVERT('foo', 'LATIN2', 'UTF8'); ! -- UTF8 --> LATIN3 SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); ! SELECT CONVERT('foo', 'UTF8', 'LATIN3'); ! -- LATIN3 --> UTF8 SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); ! SELECT CONVERT('foo', 'LATIN3', 'UTF8'); ! -- UTF8 --> LATIN4 SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); ! SELECT CONVERT('foo', 'UTF8', 'LATIN4'); ! -- LATIN4 --> UTF8 SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); ! SELECT CONVERT('foo', 'LATIN4', 'UTF8'); ! -- UTF8 --> LATIN5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); ! SELECT CONVERT('foo', 'UTF8', 'LATIN5'); ! -- LATIN5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); ! SELECT CONVERT('foo', 'LATIN5', 'UTF8'); ! -- UTF8 --> LATIN6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); ! SELECT CONVERT('foo', 'UTF8', 'LATIN6'); ! -- LATIN6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); ! SELECT CONVERT('foo', 'LATIN6', 'UTF8'); ! -- UTF8 --> LATIN7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); ! SELECT CONVERT('foo', 'UTF8', 'LATIN7'); ! -- LATIN7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); ! SELECT CONVERT('foo', 'LATIN7', 'UTF8'); ! -- UTF8 --> LATIN8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); ! SELECT CONVERT('foo', 'UTF8', 'LATIN8'); ! -- LATIN8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); ! SELECT CONVERT('foo', 'LATIN8', 'UTF8'); ! -- UTF8 --> LATIN9 SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); ! SELECT CONVERT('foo', 'UTF8', 'LATIN9'); ! -- LATIN9 --> UTF8 SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); ! SELECT CONVERT('foo', 'LATIN9', 'UTF8'); ! -- UTF8 --> LATIN10 SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); ! SELECT CONVERT('foo', 'UTF8', 'LATIN10'); ! -- LATIN10 --> UTF8 SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); ! SELECT CONVERT('foo', 'LATIN10', 'UTF8'); ! -- UTF8 --> ISO-8859-5 SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-5'); ! -- ISO-8859-5 --> UTF8 SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-5', 'UTF8'); ! -- UTF8 --> ISO-8859-6 SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-6'); ! -- ISO-8859-6 --> UTF8 SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-6', 'UTF8'); ! -- UTF8 --> ISO-8859-7 SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-7'); ! -- ISO-8859-7 --> UTF8 SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-7', 'UTF8'); ! -- UTF8 --> ISO-8859-8 SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-8'); ! -- ISO-8859-8 --> UTF8 SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-8', 'UTF8'); ! -- LATIN1 --> UTF8 SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); ! SELECT CONVERT('foo', 'LATIN1', 'UTF8'); ! -- UTF8 --> LATIN1 SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); ! SELECT CONVERT('foo', 'UTF8', 'LATIN1'); ! -- JOHAB --> UTF8 SELECT CONVERT('foo' USING johab_to_utf_8); ! SELECT CONVERT('foo', 'JOHAB', 'UTF8'); ! -- UTF8 --> JOHAB SELECT CONVERT('foo' USING utf_8_to_johab); ! SELECT CONVERT('foo', 'UTF8', 'JOHAB'); ! -- SJIS --> UTF8 SELECT CONVERT('foo' USING sjis_to_utf_8); ! SELECT CONVERT('foo', 'SJIS', 'UTF8'); ! -- UTF8 --> SJIS SELECT CONVERT('foo' USING utf_8_to_sjis); ! SELECT CONVERT('foo', 'UTF8', 'SJIS'); ! -- WIN1258 --> UTF8 ! SELECT CONVERT('foo' USING win1258_to_utf_8); ! SELECT CONVERT('foo', 'WIN1258', 'UTF8'); ! -- UTF8 --> WIN1258 ! SELECT CONVERT('foo' USING utf_8_to_win1258); ! SELECT CONVERT('foo', 'UTF8', 'WIN1258'); ! -- UHC --> UTF8 SELECT CONVERT('foo' USING uhc_to_utf_8); ! SELECT CONVERT('foo', 'UHC', 'UTF8'); ! -- UTF8 --> UHC SELECT CONVERT('foo' USING utf_8_to_uhc); ! SELECT CONVERT('foo', 'UTF8', 'UHC'); ! -- UTF8 --> WIN1250 SELECT CONVERT('foo' USING utf_8_to_windows_1250); ! SELECT CONVERT('foo', 'UTF8', 'WIN1250'); ! -- WIN1250 --> UTF8 SELECT CONVERT('foo' USING windows_1250_to_utf_8); ! SELECT CONVERT('foo', 'WIN1250', 'UTF8'); ! -- UTF8 --> WIN1256 SELECT CONVERT('foo' USING utf_8_to_windows_1256); ! SELECT CONVERT('foo', 'UTF8', 'WIN1256'); ! -- WIN1256 --> UTF8 SELECT CONVERT('foo' USING windows_1256_to_utf_8); ! SELECT CONVERT('foo', 'WIN1256', 'UTF8'); ! -- UTF8 --> WIN874 SELECT CONVERT('foo' USING utf_8_to_windows_874); ! SELECT CONVERT('foo', 'UTF8', 'WIN874'); ! -- WIN874 --> UTF8 SELECT CONVERT('foo' USING windows_874_to_utf_8); ! SELECT CONVERT('foo', 'WIN874', 'UTF8'); -- -- return to the super user --
Further to my earlier e-mail, there would have to be two lines added to conversion_create.sql for each alternate function name Like: CREATE OR REPLACE FUNCTION ascii_to_whatever (INTEGER, INTEGER, CSTRING, CSTRING, INTEGER) RETURNS VOID AS '$libdir/ascmic', 'ascii_to_mic' LANGUAGE 'c' STRICT; CREATE CONVERSION pg_catalog.ascii_to_whatever FOR 'SQL_ASCII' TO 'MULE_INTERNAL' FROM ascii_to_whatever; Lorne In <200502262050.j1QKoNi10358@candle.pha.pa.us>, on 02/26/05 at 03:50 PM, Bruce Momjian <pgman@candle.pha.pa.us> said: >Peter Eisentraut wrote: >> Am Freitag, 25. Februar 2005 05:51 schrieb Bruce Momjian: >> > so I see what he is saying. We are not consistent in favoring the >> > official names vs. the common names. >> > >> > I will work on a patch that people can review and test. >> >> I think this is what we should do: >> >> UNICODE => UTF8 >> ALT => WIN866 >> WIN => WIN1251 >> TCVN => WIN1258 >> >> That should clear it up. >OK, here is a patch that makes those changes. >The only uncertainty I have is with the the use of the TCVN conversion >routine names, e.g.: > SELECT CONVERT('foo' USING tcvn_to_utf_8); >I assume this is the same as: > SELECT CONVERT('foo', 'WIN1258', 'UTF8'); >and > SELECT CONVERT('foo', 'TCVN', 'UTF8'); -- alias usage >So, why would people use the routine name? Both forms are documented. >The first one with USING does not accept aliases, while the others do. >I think this should be renamed to win1258_to_utf_8. However, this would >be an incompatibility. We should mention it in the release notes. >Other than that the other conversion files were already named fine, e.g. >ascii_to_utf_8 (no UNICODE), however it is utf_8 and not utf8. I am >unsure how to handle these. -- ----------------------------------------------------------- lsunley@mb.sympatico.ca -----------------------------------------------------------
The routines that do the conversion could have alternate names specified in the conversion_create.sql. There is not reason that I can see why you cannot have two function names pointing to the same routine. like CREATE OR REPLACE FUNCTION ascii_to_mic (INTEGER, INTEGER, CSTRING, CSTRING, INTEGER) RETURNS VOID AS '$libdir/ascmic', 'ascii_to_mic' LANGUAGE 'c' STRICT; and CREATE OR REPLACE FUNCTION ascii_to_whatever (INTEGER, INTEGER, CSTRING, CSTRING, INTEGER) RETURNS VOID AS '$libdir/ascmic', 'ascii_to_mic' LANGUAGE 'c' STRICT; I just tried with those two and it works OK That way you do not break compatibility with existing SQL scripts and/or programs using the existing function names. Lorne In <200502262050.j1QKoNi10358@candle.pha.pa.us>, on 02/26/05 at 03:50 PM, Bruce Momjian <pgman@candle.pha.pa.us> said: >Peter Eisentraut wrote: >> Am Freitag, 25. Februar 2005 05:51 schrieb Bruce Momjian: >> > so I see what he is saying. We are not consistent in favoring the >> > official names vs. the common names. >> > >> > I will work on a patch that people can review and test. >> >> I think this is what we should do: >> >> UNICODE => UTF8 >> ALT => WIN866 >> WIN => WIN1251 >> TCVN => WIN1258 >> >> That should clear it up. >OK, here is a patch that makes those changes. >The only uncertainty I have is with the the use of the TCVN conversion >routine names, e.g.: > SELECT CONVERT('foo' USING tcvn_to_utf_8); >I assume this is the same as: > SELECT CONVERT('foo', 'WIN1258', 'UTF8'); >and > SELECT CONVERT('foo', 'TCVN', 'UTF8'); -- alias usage >So, why would people use the routine name? Both forms are documented. >The first one with USING does not accept aliases, while the others do. >I think this should be renamed to win1258_to_utf_8. However, this would >be an incompatibility. We should mention it in the release notes. >Other than that the other conversion files were already named fine, e.g. >ascii_to_utf_8 (no UNICODE), however it is utf_8 and not utf8. I am >unsure how to handle these. -- ----------------------------------------------------------- lsunley@mb.sympatico.ca -----------------------------------------------------------
In <200502270409.j1R49hc08394@candle.pha.pa.us>, on 02/26/05 at 11:09 PM, Bruce Momjian <pgman@candle.pha.pa.us> said: >Here is an updated version that handles all cases. It does rename the >routine names so the primary encoding name is used for the routine names. >This will be documented in the release notes if anyone actually uses >those names in their code. >This patch requires renaming of the utf8_and_tcvn directory so it will >not apply cleanly. >I left the routines named utf_8 alone because the code splits encoding >names at breaks, like this iso_8859_7_to_utf_8. I assume that is OK. You cannot patch conversion_create.sql You have to patch the makefile that generates it. The CONVERSIONS variable has the names etc and the @set $(CONVERSIONS) etc code generates the conversion_create.sql file -- ----------------------------------------------------------- lsunley@mb.sympatico.ca -----------------------------------------------------------
Ignore previous e-mail... Missed the patch to the makefile Sorry about that -- ----------------------------------------------------------- lsunley@mb.sympatico.ca -----------------------------------------------------------
В Сбт, 26/02/2005 в 15:50 -0500, Bruce Momjian пишет: > Other than that the other conversion files were already named fine, e.g. > ascii_to_utf_8 (no UNICODE), however it is utf_8 and not utf8. I am > unsure how to handle these. General remark about the spelling of this encoding: The correct encoding name is "UTF-8". "The official name and spelling of this encoding is UTF-8, where UTF stands for UCS Transformation Format. Please do not write UTF-8 in any documentation text in other ways (such as utf8 or UTF_8), unless of course you refer to a variable name and not the encoding itself." from http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 Thanks -- Markus Bertheau ☭ <twanger@bluetwanger.de>
Markus Bertheau ? wrote: > ? ???, 26/02/2005 ? 15:50 -0500, Bruce Momjian ?????: > > > Other than that the other conversion files were already named fine, e.g. > > ascii_to_utf_8 (no UNICODE), however it is utf_8 and not utf8. I am > > unsure how to handle these. > > General remark about the spelling of this encoding: > > The correct encoding name is "UTF-8". > > "The official name and spelling of this encoding is UTF-8, where UTF > stands for UCS Transformation Format. Please do not write UTF-8 in any > documentation text in other ways (such as utf8 or UTF_8), unless of > course you refer to a variable name and not the encoding itself." > > from > > http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 True, but Peter says the ANSI standard calls it UTF8 so that's what I used. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
Bruce Momjian <pgman@candle.pha.pa.us> writes: >> The correct encoding name is "UTF-8". > True, but Peter says the ANSI standard calls it UTF8 so that's what I > used. What SQL99 actually says is - UTF8 specifies the name of a character repertoire that consists of every character represented by The Unicode Standard Version 2.0 and by ISO/IEC 10646 UTF-8, where each character is encoded using the UTF-8 encoding, occupying from 1 (one) through 6 octets. That is, "UTF8" is an identifier chosen to refer to an encoding which they know perfectly well is really called UTF-8. We should probably follow the same convention of using UTF8 in code identifiers and UTF-8 in documentation. In particular, UTF_8 with an underscore is sanctioned by nobody and should be avoided. regards, tom lane
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > >> The correct encoding name is "UTF-8". > > > True, but Peter says the ANSI standard calls it UTF8 so that's what I > > used. > > What SQL99 actually says is > > - UTF8 specifies the name of a character repertoire that consists > of every character represented by The Unicode Standard Version > 2.0 and by ISO/IEC 10646 UTF-8, where each character is encoded > using the UTF-8 encoding, occupying from 1 (one) through 6 > octets. > > That is, "UTF8" is an identifier chosen to refer to an encoding which > they know perfectly well is really called UTF-8. We should probably > follow the same convention of using UTF8 in code identifiers and UTF-8 > in documentation. In particular, UTF_8 with an underscore is sanctioned > by nobody and should be avoided. OK, new version with utf_8 changed to utf8. The docs mention UTF-8 when talking about the encoding, but UTF8 when listing the code to use. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073 Index: doc/README.mb.jp =================================================================== RCS file: /cvsroot/pgsql/doc/README.mb.jp,v retrieving revision 1.16 diff -c -c -r1.16 README.mb.jp *** doc/README.mb.jp 21 Oct 2002 05:14:06 -0000 1.16 --- doc/README.mb.jp 3 Mar 2005 05:11:34 -0000 *************** *** 299,305 **** PostgreSQL$B$N(BCONVERT$B$H5!G=$O$[$H$s$IF1$8$G$9$,!$8F$S=P$77A<0$,0[$j$^(B $B$9!%(B ! SELECT convert(text using euc_jp_to_utf_8) FROM unicode_tbl; "using" $B$N8e$N0z?t$O!V%3%s%P!<%8%g%sL>!W$G$9!%$3$NNc$G$O!$(BEUC_JP $B$+(B $B$i(B UTF-8 $B$KJQ49$9$k%3%s%P!<%8%g%s$r;XDj$7$F$$$^$9!%Dj5A:Q$N%3%s%P!<(B --- 299,305 ---- PostgreSQL$B$N(BCONVERT$B$H5!G=$O$[$H$s$IF1$8$G$9$,!$8F$S=P$77A<0$,0[$j$^(B $B$9!%(B ! SELECT convert(text using euc_jp_to_utf8) FROM unicode_tbl; "using" $B$N8e$N0z?t$O!V%3%s%P!<%8%g%sL>!W$G$9!%$3$NNc$G$O!$(BEUC_JP $B$+(B $B$i(B UTF-8 $B$KJQ49$9$k%3%s%P!<%8%g%s$r;XDj$7$F$$$^$9!%Dj5A:Q$N%3%s%P!<(B Index: doc/TODO =================================================================== RCS file: /cvsroot/pgsql/doc/TODO,v retrieving revision 1.1456 diff -c -c -r1.1456 TODO *** doc/TODO 1 Mar 2005 05:00:20 -0000 1.1456 --- doc/TODO 3 Mar 2005 05:11:34 -0000 *************** *** 215,221 **** * Optimize locale to have minimal performance impact when not used * Support multiple simultaneous character sets, per SQL92 ! * Improve Unicode combined character handling (?) * Add octet_length_server() and octet_length_client() * Make octet_length_client() the same as octet_length()? --- 215,221 ---- * Optimize locale to have minimal performance impact when not used * Support multiple simultaneous character sets, per SQL92 ! * Improve UTF8 combined character handling (?) * Add octet_length_server() and octet_length_client() * Make octet_length_client() the same as octet_length()? Index: doc/src/sgml/charset.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/charset.sgml,v retrieving revision 2.48 diff -c -c -r2.48 charset.sgml *** doc/src/sgml/charset.sgml 4 Jan 2005 00:05:44 -0000 2.48 --- doc/src/sgml/charset.sgml 3 Mar 2005 05:11:35 -0000 *************** *** 285,291 **** allows you to store text in a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as <acronym>EUC</> (Extended Unix ! Code), Unicode, and Mule internal code. All character sets can be used transparently throughout the server. (If you use extension functions from other sources, it depends on whether they wrote their code correctly.) The default character set is selected while --- 285,291 ---- allows you to store text in a variety of character sets, including single-byte character sets such as the ISO 8859 series and multiple-byte character sets such as <acronym>EUC</> (Extended Unix ! Code), UTF8, and Mule internal code. All character sets can be used transparently throughout the server. (If you use extension functions from other sources, it depends on whether they wrote their code correctly.) The default character set is selected while *************** *** 339,346 **** <entry>Taiwan <acronym>EUC</acronym></entry> </row> <row> ! <entry><literal>UNICODE</literal></entry> ! <entry>Unicode (<acronym>UTF</acronym>-8)</entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> --- 339,346 ---- <entry>Taiwan <acronym>EUC</acronym></entry> </row> <row> ! <entry><literal>UTF8</literal></entry> ! <entry>UTF-8 (Unicode, 8-bit)</entry> </row> <row> <entry><literal>MULE_INTERNAL</literal></entry> *************** *** 407,413 **** <entry><acronym>KOI</acronym>8-R(U)</entry> </row> <row> ! <entry><literal>ALT</literal></entry> <entry>Windows CP866</entry> </row> <row> --- 407,413 ---- <entry><acronym>KOI</acronym>8-R(U)</entry> </row> <row> ! <entry><literal>WIN866</literal></entry> <entry>Windows CP866</entry> </row> <row> *************** *** 419,425 **** <entry>Windows CP1250</entry> </row> <row> ! <entry><literal>WIN</literal></entry> <entry>Windows CP1251</entry> </row> <row> --- 419,425 ---- <entry>Windows CP1250</entry> </row> <row> ! <entry><literal>WIN1251</literal></entry> <entry>Windows CP1251</entry> </row> <row> *************** *** 427,434 **** <entry>Windows CP1256 (Arabic)</entry> </row> <row> ! <entry><literal>TCVN</literal></entry> ! <entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry> </row> </tbody> </tgroup> --- 427,434 ---- <entry>Windows CP1256 (Arabic)</entry> </row> <row> ! <entry><literal>WIN1258</literal></entry> ! <entry>Windows CP1258 (Vietnamese)/<acronym>TCVN</>-5712</entry> </row> </tbody> </tgroup> *************** *** 504,510 **** regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP ! unicode | t-ishii | UNICODE (9 rows) </screen> </para> --- 504,510 ---- regression | t-ishii | SQL_ASCII template1 | t-ishii | EUC_JP test | t-ishii | EUC_JP ! utf8 | t-ishii | UTF8 (9 rows) </screen> </para> *************** *** 561,686 **** <tbody> <row> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>SQL_ASCII</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_JP</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>EUC_CN</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>EUC_KR</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>JOHAB</literal></entry> ! <entry><literal>JOHAB</literal>, <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>EUC_TW</literal></entry> <entry><literal>EUC_TW</literal>, <literal>BIG5</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN1</literal></entry> ! <entry><literal>LATIN1</literal>, <literal>UNICODE</literal> <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN3</literal></entry> ! <entry><literal>LATIN3</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN4</literal></entry> ! <entry><literal>LATIN4</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN5</literal></entry> ! <entry><literal>LATIN5</literal>, <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>LATIN6</literal></entry> ! <entry><literal>LATIN6</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN7</literal></entry> ! <entry><literal>LATIN7</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN8</literal></entry> ! <entry><literal>LATIN8</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN9</literal></entry> ! <entry><literal>LATIN9</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN10</literal></entry> ! <entry><literal>LATIN10</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> <entry><literal>ISO_8859_5</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>, ! <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal> </entry> </row> <row> <entry><literal>ISO_8859_6</literal></entry> <entry><literal>ISO_8859_6</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>ISO_8859_7</literal></entry> <entry><literal>ISO_8859_7</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>ISO_8859_8</literal></entry> <entry><literal>ISO_8859_8</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> ! <entry><literal>UNICODE</literal></entry> <entry> <literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>, --- 561,686 ---- <tbody> <row> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>SQL_ASCII</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_JP</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>EUC_CN</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>EUC_KR</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>JOHAB</literal></entry> ! <entry><literal>JOHAB</literal>, <literal>UTF8</literal> </entry> </row> <row> <entry><literal>EUC_TW</literal></entry> <entry><literal>EUC_TW</literal>, <literal>BIG5</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN1</literal></entry> ! <entry><literal>LATIN1</literal>, <literal>UTF8</literal> <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN2</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN3</literal></entry> ! <entry><literal>LATIN3</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN4</literal></entry> ! <entry><literal>LATIN4</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN5</literal></entry> ! <entry><literal>LATIN5</literal>, <literal>UTF8</literal> </entry> </row> <row> <entry><literal>LATIN6</literal></entry> ! <entry><literal>LATIN6</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN7</literal></entry> ! <entry><literal>LATIN7</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN8</literal></entry> ! <entry><literal>LATIN8</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN9</literal></entry> ! <entry><literal>LATIN9</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>LATIN10</literal></entry> ! <entry><literal>LATIN10</literal>, <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>ISO_8859_5</literal></entry> <entry><literal>ISO_8859_5</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal>, ! <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal> </entry> </row> <row> <entry><literal>ISO_8859_6</literal></entry> <entry><literal>ISO_8859_6</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>ISO_8859_7</literal></entry> <entry><literal>ISO_8859_7</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>ISO_8859_8</literal></entry> <entry><literal>ISO_8859_8</literal>, ! <literal>UTF8</literal> </entry> </row> <row> ! <entry><literal>UTF8</literal></entry> <entry> <literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>, *************** *** 691,700 **** <literal>ISO_8859_6</literal>, <literal>ISO_8859_7</literal>, <literal>ISO_8859_8</literal>, ! <literal>WIN</literal>, <literal>ALT</literal>, <literal>KOI8</literal>, <literal>WIN1256</literal>, ! <literal>TCVN</literal>, <literal>WIN874</literal>, <literal>GB18030</literal>, <literal>WIN1250</literal> --- 691,700 ---- <literal>ISO_8859_6</literal>, <literal>ISO_8859_7</literal>, <literal>ISO_8859_8</literal>, ! <literal>WIN1251</literal>, <literal>WIN866</literal>, <literal>KOI8</literal>, <literal>WIN1256</literal>, ! <literal>WIN1258</literal>, <literal>WIN874</literal>, <literal>GB18030</literal>, <literal>WIN1250</literal> *************** *** 704,756 **** <entry><literal>MULE_INTERNAL</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>, <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>, ! <literal>WIN</literal>, <literal>ALT</literal>, <literal>WIN1250</literal>, <literal>BIG5</literal>, <literal>ISO_8859_5</literal>, <literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>ALT</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> <entry><literal>WIN1250</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, ! <literal>ALT</literal>, <literal>KOI8</literal>, ! <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal>, ! <literal>UNICODE</literal> </entry> </row> <row> ! <entry><literal>TCVN</literal></entry> ! <entry><literal>TCVN</literal>, ! <literal>UNICODE</literal> </entry> </row> </tbody> --- 704,756 ---- <entry><literal>MULE_INTERNAL</literal></entry> <entry><literal>EUC_JP</literal>, <literal>SJIS</literal>, <literal>EUC_KR</literal>, <literal>EUC_CN</literal>, <literal>EUC_TW</literal>, <literal>BIG5</literal>, <literal>LATIN1</literal> to <literal>LATIN5</literal>, ! <literal>WIN1251</literal>, <literal>WIN866</literal>, <literal>WIN1250</literal>, <literal>BIG5</literal>, <literal>ISO_8859_5</literal>, <literal>KOI8</literal></entry> </row> <row> <entry><literal>KOI8</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN866</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN874</literal></entry> <entry><literal>WIN874</literal>, ! <literal>UTF8</literal> </entry> </row> <row> <entry><literal>WIN1250</literal></entry> <entry><literal>LATIN2</literal>, <literal>WIN1250</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>ISO_8859_5</literal>, <literal>WIN1251</literal>, ! <literal>WIN866</literal>, <literal>KOI8</literal>, ! <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal> </entry> </row> <row> <entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal>, ! <literal>UTF8</literal> </entry> </row> <row> ! <entry><literal>WIN1258</literal></entry> ! <entry><literal>WIN1258</literal>, ! <literal>UTF8</literal> </entry> </row> </tbody> Index: doc/src/sgml/func.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/func.sgml,v retrieving revision 1.239 diff -c -c -r1.239 func.sgml *** doc/src/sgml/func.sgml 28 Feb 2005 03:45:20 -0000 1.239 --- doc/src/sgml/func.sgml 3 Mar 2005 05:11:43 -0000 *************** *** 933,940 **** linkend="conversion-names"> for available conversion names. </entry> ! <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf_8)</literal></entry> ! <entry><literal>'PostgreSQL'</literal> in Unicode (UTF-8) encoding</entry> </row> <row> --- 933,940 ---- linkend="conversion-names"> for available conversion names. </entry> ! <entry><literal>convert('PostgreSQL' using iso_8859_1_to_utf8)</literal></entry> ! <entry><literal>'PostgreSQL'</literal> in UTF8 (Unicode, 8-bit) encoding</entry> </row> <row> *************** *** 1105,1112 **** <parameter>src_encoding</parameter> is omitted, database encoding is assumed. </entry> ! <entry><literal>convert( 'text_in_unicode', 'UNICODE', 'LATIN1')</literal></entry> ! <entry><literal>text_in_unicode</literal> represented in ISO 8859-1 encoding</entry> </row> <row> --- 1105,1112 ---- <parameter>src_encoding</parameter> is omitted, database encoding is assumed. </entry> ! <entry><literal>convert( 'text_in_utf8', 'UTF8', 'LATIN1')</literal></entry> ! <entry><literal>text_in_utf8</literal> represented in ISO 8859-1 encoding</entry> </row> <row> *************** *** 1421,1429 **** </row> <row> ! <entry><literal>ascii_to_utf_8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1421,1429 ---- </row> <row> ! <entry><literal>ascii_to_utf8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1439,1447 **** </row> <row> ! <entry><literal>big5_to_utf_8</literal></entry> <entry><literal>BIG5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1439,1447 ---- </row> <row> ! <entry><literal>big5_to_utf8</literal></entry> <entry><literal>BIG5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1451,1459 **** </row> <row> ! <entry><literal>euc_cn_to_utf_8</literal></entry> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1451,1459 ---- </row> <row> ! <entry><literal>euc_cn_to_utf8</literal></entry> <entry><literal>EUC_CN</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1469,1477 **** </row> <row> ! <entry><literal>euc_jp_to_utf_8</literal></entry> <entry><literal>EUC_JP</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1469,1477 ---- </row> <row> ! <entry><literal>euc_jp_to_utf8</literal></entry> <entry><literal>EUC_JP</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1481,1489 **** </row> <row> ! <entry><literal>euc_kr_to_utf_8</literal></entry> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1481,1489 ---- </row> <row> ! <entry><literal>euc_kr_to_utf8</literal></entry> <entry><literal>EUC_KR</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1499,1549 **** </row> <row> ! <entry><literal>euc_tw_to_utf_8</literal></entry> <entry><literal>EUC_TW</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>gb18030_to_utf_8</literal></entry> <entry><literal>GB18030</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>gbk_to_utf_8</literal></entry> <entry><literal>GBK</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_10_to_utf_8</literal></entry> <entry><literal>LATIN6</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_13_to_utf_8</literal></entry> <entry><literal>LATIN7</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_14_to_utf_8</literal></entry> <entry><literal>LATIN8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_15_to_utf_8</literal></entry> <entry><literal>LATIN9</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_16_to_utf_8</literal></entry> <entry><literal>LATIN10</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1499,1549 ---- </row> <row> ! <entry><literal>euc_tw_to_utf8</literal></entry> <entry><literal>EUC_TW</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>gb18030_to_utf8</literal></entry> <entry><literal>GB18030</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>gbk_to_utf8</literal></entry> <entry><literal>GBK</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_10_to_utf8</literal></entry> <entry><literal>LATIN6</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_13_to_utf8</literal></entry> <entry><literal>LATIN7</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_14_to_utf8</literal></entry> <entry><literal>LATIN8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_15_to_utf8</literal></entry> <entry><literal>LATIN9</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_16_to_utf8</literal></entry> <entry><literal>LATIN10</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1553,1561 **** </row> <row> ! <entry><literal>iso_8859_1_to_utf_8</literal></entry> <entry><literal>LATIN1</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1553,1561 ---- </row> <row> ! <entry><literal>iso_8859_1_to_utf8</literal></entry> <entry><literal>LATIN1</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1565,1573 **** </row> <row> ! <entry><literal>iso_8859_2_to_utf_8</literal></entry> <entry><literal>LATIN2</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1565,1573 ---- </row> <row> ! <entry><literal>iso_8859_2_to_utf8</literal></entry> <entry><literal>LATIN2</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1583,1591 **** </row> <row> ! <entry><literal>iso_8859_3_to_utf_8</literal></entry> <entry><literal>LATIN3</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1583,1591 ---- </row> <row> ! <entry><literal>iso_8859_3_to_utf8</literal></entry> <entry><literal>LATIN3</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1595,1603 **** </row> <row> ! <entry><literal>iso_8859_4_to_utf_8</literal></entry> <entry><literal>LATIN4</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1595,1603 ---- </row> <row> ! <entry><literal>iso_8859_4_to_utf8</literal></entry> <entry><literal>LATIN4</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1613,1663 **** </row> <row> ! <entry><literal>iso_8859_5_to_utf_8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> ! <entry><literal>iso_8859_6_to_utf_8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_7_to_utf_8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_8_to_utf_8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>iso_8859_9_to_utf_8</literal></entry> <entry><literal>LATIN5</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>johab_to_utf_8</literal></entry> <entry><literal>JOHAB</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> --- 1613,1663 ---- </row> <row> ! <entry><literal>iso_8859_5_to_utf8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>iso_8859_5_to_windows_866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> ! <entry><literal>iso_8859_6_to_utf8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_7_to_utf8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_8_to_utf8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>iso_8859_9_to_utf8</literal></entry> <entry><literal>LATIN5</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>johab_to_utf8</literal></entry> <entry><literal>JOHAB</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> *************** *** 1673,1693 **** </row> <row> ! <entry><literal>koi8_r_to_utf_8</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_1251</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_866</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> --- 1673,1693 ---- </row> <row> ! <entry><literal>koi8_r_to_utf8</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_1251</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>koi8_r_to_windows_866</literal></entry> <entry><literal>KOI8</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> *************** *** 1777,1789 **** <row> <entry><literal>mic_to_windows_1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> <entry><literal>mic_to_windows_866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> --- 1777,1789 ---- <row> <entry><literal>mic_to_windows_1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> <entry><literal>mic_to_windows_866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> *************** *** 1799,2010 **** </row> <row> ! <entry><literal>sjis_to_utf_8</literal></entry> <entry><literal>SJIS</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>tcvn_to_utf_8</literal></entry> ! <entry><literal>TCVN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>uhc_to_utf_8</literal></entry> <entry><literal>UHC</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> ! <entry><literal>utf_8_to_ascii</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>SQL_ASCII</literal></entry> </row> <row> ! <entry><literal>utf_8_to_big5</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>BIG5</literal></entry> </row> <row> ! <entry><literal>utf_8_to_euc_cn</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_CN</literal></entry> </row> <row> ! <entry><literal>utf_8_to_euc_jp</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_JP</literal></entry> </row> <row> ! <entry><literal>utf_8_to_euc_kr</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_KR</literal></entry> </row> <row> ! <entry><literal>utf_8_to_euc_tw</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>EUC_TW</literal></entry> </row> <row> ! <entry><literal>utf_8_to_gb18030</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>GB18030</literal></entry> </row> <row> ! <entry><literal>utf_8_to_gbk</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>GBK</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_1</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN1</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_10</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN6</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_13</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN7</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_14</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN8</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_15</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN9</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_16</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN10</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_2</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN2</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_3</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN3</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_4</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN4</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_5</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_6</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_6</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_7</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_7</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_8</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>ISO_8859_8</literal></entry> </row> <row> ! <entry><literal>utf_8_to_iso_8859_9</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>LATIN5</literal></entry> </row> <row> ! <entry><literal>utf_8_to_johab</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>JOHAB</literal></entry> </row> <row> ! <entry><literal>utf_8_to_koi8_r</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> ! <entry><literal>utf_8_to_sjis</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>SJIS</literal></entry> </row> <row> ! <entry><literal>utf_8_to_tcvn</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>TCVN</literal></entry> </row> <row> ! <entry><literal>utf_8_to_uhc</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>UHC</literal></entry> </row> <row> ! <entry><literal>utf_8_to_windows_1250</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN1250</literal></entry> </row> <row> ! <entry><literal>utf_8_to_windows_1251</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>WIN</literal></entry> </row> <row> ! <entry><literal>utf_8_to_windows_1256</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN1256</literal></entry> </row> <row> ! <entry><literal>utf_8_to_windows_866</literal></entry> ! <entry><literal>UNICODE</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> ! <entry><literal>utf_8_to_windows_874</literal></entry> ! <entry><literal>UNICODE</literal></entry> <entry><literal>WIN874</literal></entry> </row> --- 1799,2010 ---- </row> <row> ! <entry><literal>sjis_to_utf8</literal></entry> <entry><literal>SJIS</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>tcvn_to_utf8</literal></entry> ! <entry><literal>WIN1258</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>uhc_to_utf8</literal></entry> <entry><literal>UHC</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> ! <entry><literal>utf8_to_ascii</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>SQL_ASCII</literal></entry> </row> <row> ! <entry><literal>utf8_to_big5</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>BIG5</literal></entry> </row> <row> ! <entry><literal>utf8_to_euc_cn</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_CN</literal></entry> </row> <row> ! <entry><literal>utf8_to_euc_jp</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_JP</literal></entry> </row> <row> ! <entry><literal>utf8_to_euc_kr</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_KR</literal></entry> </row> <row> ! <entry><literal>utf8_to_euc_tw</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>EUC_TW</literal></entry> </row> <row> ! <entry><literal>utf8_to_gb18030</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>GB18030</literal></entry> </row> <row> ! <entry><literal>utf8_to_gbk</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>GBK</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_1</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN1</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_10</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN6</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_13</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN7</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_14</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN8</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_15</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN9</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_16</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN10</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_2</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN2</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_3</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN3</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_4</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN4</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_5</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_6</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_6</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_7</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_7</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_8</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>ISO_8859_8</literal></entry> </row> <row> ! <entry><literal>utf8_to_iso_8859_9</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>LATIN5</literal></entry> </row> <row> ! <entry><literal>utf8_to_johab</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>JOHAB</literal></entry> </row> <row> ! <entry><literal>utf8_to_koi8_r</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> ! <entry><literal>utf8_to_sjis</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>SJIS</literal></entry> </row> <row> ! <entry><literal>utf8_to_tcvn</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN1258</literal></entry> </row> <row> ! <entry><literal>utf8_to_uhc</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>UHC</literal></entry> </row> <row> ! <entry><literal>utf8_to_windows_1250</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN1250</literal></entry> </row> <row> ! <entry><literal>utf8_to_windows_1251</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN1251</literal></entry> </row> <row> ! <entry><literal>utf8_to_windows_1256</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN1256</literal></entry> </row> <row> ! <entry><literal>utf8_to_windows_866</literal></entry> ! <entry><literal>UTF8</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> ! <entry><literal>utf8_to_windows_874</literal></entry> ! <entry><literal>UTF8</literal></entry> <entry><literal>WIN874</literal></entry> </row> *************** *** 2021,2101 **** </row> <row> ! <entry><literal>windows_1250_to_utf_8</literal></entry> <entry><literal>WIN1250</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_1251_to_iso_8859_5</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_1251_to_koi8_r</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_1251_to_mic</literal></entry> ! <entry><literal>WIN</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> ! <entry><literal>windows_1251_to_utf_8</literal></entry> ! <entry><literal>WIN</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_1251_to_windows_866</literal></entry> ! <entry><literal>WIN</literal></entry> ! <entry><literal>ALT</literal></entry> </row> <row> ! <entry><literal>windows_1256_to_utf_8</literal></entry> <entry><literal>WIN1256</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_866_to_iso_8859_5</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_866_to_koi8_r</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_866_to_mic</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> ! <entry><literal>windows_866_to_utf_8</literal></entry> ! <entry><literal>ALT</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> <row> <entry><literal>windows_866_to_windows_1251</literal></entry> ! <entry><literal>ALT</literal></entry> <entry><literal>WIN</literal></entry> </row> <row> ! <entry><literal>windows_874_to_utf_8</literal></entry> <entry><literal>WIN874</literal></entry> ! <entry><literal>UNICODE</literal></entry> </row> </tbody> --- 2021,2101 ---- </row> <row> ! <entry><literal>windows_1250_to_utf8</literal></entry> <entry><literal>WIN1250</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_1251_to_iso_8859_5</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_1251_to_koi8_r</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_1251_to_mic</literal></entry> ! <entry><literal>WIN1251</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> ! <entry><literal>windows_1251_to_utf8</literal></entry> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_1251_to_windows_866</literal></entry> ! <entry><literal>WIN1251</literal></entry> ! <entry><literal>WIN866</literal></entry> </row> <row> ! <entry><literal>windows_1256_to_utf8</literal></entry> <entry><literal>WIN1256</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_866_to_iso_8859_5</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>ISO_8859_5</literal></entry> </row> <row> <entry><literal>windows_866_to_koi8_r</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>KOI8</literal></entry> </row> <row> <entry><literal>windows_866_to_mic</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>MULE_INTERNAL</literal></entry> </row> <row> ! <entry><literal>windows_866_to_utf8</literal></entry> ! <entry><literal>WIN866</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> <row> <entry><literal>windows_866_to_windows_1251</literal></entry> ! <entry><literal>WIN866</literal></entry> <entry><literal>WIN</literal></entry> </row> <row> ! <entry><literal>windows_874_to_utf8</literal></entry> <entry><literal>WIN874</literal></entry> ! <entry><literal>UTF8</literal></entry> </row> </tbody> *************** *** 3372,3378 **** <row> <entry> <literal>\u</><replaceable>wxyz</> </entry> <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) ! the Unicode character <literal>U+</><replaceable>wxyz</> in the local byte ordering </entry> </row> --- 3372,3378 ---- <row> <entry> <literal>\u</><replaceable>wxyz</> </entry> <entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits) ! the UTF16 (Unicode, 16-bit) character <literal>U+</><replaceable>wxyz</> in the local byte ordering </entry> </row> Index: doc/src/sgml/ref/alter_conversion.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/alter_conversion.sgml,v retrieving revision 1.5 diff -c -c -r1.5 alter_conversion.sgml *** doc/src/sgml/ref/alter_conversion.sgml 25 Jun 2004 21:55:50 -0000 1.5 --- doc/src/sgml/ref/alter_conversion.sgml 3 Mar 2005 05:11:43 -0000 *************** *** 72,89 **** <title>Examples</title> <para> ! To rename the conversion <literal>iso_8859_1_to_utf_8</literal> to <literal>latin1_to_unicode</literal>: <programlisting> ! ALTER CONVERSION iso_8859_1_to_utf_8 RENAME TO latin1_to_unicode; </programlisting> </para> <para> ! To change the owner of the conversion <literal>iso_8859_1_to_utf_8</literal> to <literal>joe</literal>: <programlisting> ! ALTER CONVERSION iso_8859_1_to_utf_8 OWNER TO joe; </programlisting> </para> </refsect1> --- 72,89 ---- <title>Examples</title> <para> ! To rename the conversion <literal>iso_8859_1_to_utf8</literal> to <literal>latin1_to_unicode</literal>: <programlisting> ! ALTER CONVERSION iso_8859_1_to_utf8 RENAME TO latin1_to_unicode; </programlisting> </para> <para> ! To change the owner of the conversion <literal>iso_8859_1_to_utf8</literal> to <literal>joe</literal>: <programlisting> ! ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe; </programlisting> </para> </refsect1> Index: doc/src/sgml/ref/comment.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v retrieving revision 1.26 diff -c -c -r1.26 comment.sgml *** doc/src/sgml/ref/comment.sgml 4 Jan 2005 00:39:53 -0000 1.26 --- doc/src/sgml/ref/comment.sgml 3 Mar 2005 05:11:44 -0000 *************** *** 195,201 **** COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance'; COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4'; COMMENT ON COLUMN my_table.my_column IS 'Employee ID number'; ! COMMENT ON CONVERSION my_conv IS 'Conversion to Unicode'; COMMENT ON DATABASE my_database IS 'Development Database'; COMMENT ON DOMAIN my_domain IS 'Email Address Domain'; COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral'; --- 195,201 ---- COMMENT ON AGGREGATE my_aggregate (double precision) IS 'Computes sample variance'; COMMENT ON CAST (text AS int4) IS 'Allow casts from text to int4'; COMMENT ON COLUMN my_table.my_column IS 'Employee ID number'; ! COMMENT ON CONVERSION my_conv IS 'Conversion to UTF8'; COMMENT ON DATABASE my_database IS 'Development Database'; COMMENT ON DOMAIN my_domain IS 'Email Address Domain'; COMMENT ON FUNCTION my_function (timestamp) IS 'Returns Roman Numeral'; Index: doc/src/sgml/ref/create_conversion.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/create_conversion.sgml,v retrieving revision 1.14 diff -c -c -r1.14 create_conversion.sgml *** doc/src/sgml/ref/create_conversion.sgml 29 Nov 2003 19:51:38 -0000 1.14 --- doc/src/sgml/ref/create_conversion.sgml 3 Mar 2005 05:11:44 -0000 *************** *** 136,145 **** <title>Examples</title> <para> ! To create a conversion from encoding <literal>UNICODE</literal> to <literal>LATIN1</literal> using <function>myfunc</>: <programlisting> ! CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc; </programlisting> </para> </refsect1> --- 136,145 ---- <title>Examples</title> <para> ! To create a conversion from encoding <literal>UTF8</literal> to <literal>LATIN1</literal> using <function>myfunc</>: <programlisting> ! CREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc; </programlisting> </para> </refsect1> Index: src/backend/utils/adt/selfuncs.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v retrieving revision 1.171 diff -c -c -r1.171 selfuncs.c *** src/backend/utils/adt/selfuncs.c 1 Feb 2005 23:07:58 -0000 1.171 --- src/backend/utils/adt/selfuncs.c 3 Mar 2005 05:11:46 -0000 *************** *** 4035,4041 **** * * NOTE: at present this assumes we are in the C locale, so that simple * bytewise comparison applies. However, we might be in a multibyte ! * encoding such as UTF-8, so we do have to watch out for generating * invalid encoding sequences. */ Const * --- 4035,4041 ---- * * NOTE: at present this assumes we are in the C locale, so that simple * bytewise comparison applies. However, we might be in a multibyte ! * encoding such as UTF8, so we do have to watch out for generating * invalid encoding sequences. */ Const * Index: src/backend/utils/mb/conv.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conv.c,v retrieving revision 1.51 diff -c -c -r1.51 conv.c *** src/backend/utils/mb/conv.c 31 Dec 2004 22:01:42 -0000 1.51 --- src/backend/utils/mb/conv.c 3 Mar 2005 05:11:46 -0000 *************** *** 303,309 **** /* * comparison routine for bsearch() ! * this routine is intended for UTF-8 -> local code */ static int compare1(const void *p1, const void *p2) --- 303,309 ---- /* * comparison routine for bsearch() ! * this routine is intended for UTF8 -> local code */ static int compare1(const void *p1, const void *p2) *************** *** 318,324 **** /* * comparison routine for bsearch() ! * this routine is intended for local code -> UTF-8 */ static int compare2(const void *p1, const void *p2) --- 318,324 ---- /* * comparison routine for bsearch() ! * this routine is intended for local code -> UTF8 */ static int compare2(const void *p1, const void *p2) *************** *** 332,340 **** } /* ! * UTF-8 ---> local code * ! * utf: input UTF-8 string. Its length is limited by "len" parameter * or a null terminator. * iso: pointer to the output. * map: the conversion map. --- 332,340 ---- } /* ! * UTF8 ---> local code * ! * utf: input UTF8 string. Its length is limited by "len" parameter * or a null terminator. * iso: pointer to the output. * map: the conversion map. *************** *** 373,379 **** { ereport(WARNING, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), ! errmsg("ignoring unconvertible UTF-8 character 0x%04x", iutf))); continue; } --- 373,379 ---- { ereport(WARNING, (errcode(ERRCODE_UNTRANSLATABLE_CHARACTER), ! errmsg("ignoring unconvertible UTF8 character 0x%04x", iutf))); continue; } *************** *** 390,396 **** } /* ! * local code ---> UTF-8 */ void LocalToUtf(unsigned char *iso, unsigned char *utf, --- 390,396 ---- } /* ! * local code ---> UTF8 */ void LocalToUtf(unsigned char *iso, unsigned char *utf, Index: src/backend/utils/mb/encnames.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/encnames.c,v retrieving revision 1.22 diff -c -c -r1.22 encnames.c *** src/backend/utils/mb/encnames.c 4 Dec 2004 18:19:31 -0000 1.22 --- src/backend/utils/mb/encnames.c 3 Mar 2005 05:11:47 -0000 *************** *** 27,33 **** * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1 * are always converted to 'iso88591'. All must be lower case. * ! * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needful? * * Karel Zak, Aug 2001 * ---------- --- 27,33 ---- * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1 * are always converted to 'iso88591'. All must be lower case. * ! * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needed? * * Karel Zak, Aug 2001 * ---------- *************** *** 35,44 **** pg_encname pg_encname_tbl[] = { { ! "abc", PG_TCVN ! }, /* alias for TCVN */ { ! "alt", PG_ALT }, /* IBM866 */ { "big5", PG_BIG5 --- 35,44 ---- pg_encname pg_encname_tbl[] = { { ! "abc", PG_WIN1258 ! }, /* alias for WIN1258 */ { ! "alt", PG_WIN866 }, /* IBM866 */ { "big5", PG_BIG5 *************** *** 166,188 **** "sqlascii", PG_SQL_ASCII }, { ! "tcvn", PG_TCVN ! }, /* TCVN; Vietnamese TCVN-5712 */ { ! "tcvn5712", PG_TCVN ! }, /* alias for TCVN */ { "uhc", PG_UHC }, /* UHC; Korean Windows CodePage 949 */ { "unicode", PG_UTF8 ! }, /* alias for UTF-8 */ { "utf8", PG_UTF8 ! }, /* UTF-8; RFC2279 */ { ! "vscii", PG_TCVN ! }, /* alias for TCVN */ { "win", PG_WIN1251 }, /* _dirty_ alias for windows-1251 --- 166,191 ---- "sqlascii", PG_SQL_ASCII }, { ! "tcvn", PG_WIN1258 ! }, /* alias for WIN1258 */ { ! "tcvn5712", PG_WIN1258 ! }, /* alias for WIN1258 */ { "uhc", PG_UHC }, /* UHC; Korean Windows CodePage 949 */ { "unicode", PG_UTF8 ! }, /* alias for UTF8 */ ! { ! "utf-8", PG_UTF8 ! }, /* UTF8; RFC2279 */ { "utf8", PG_UTF8 ! }, /* alias for UTF8 */ { ! "vscii", PG_WIN1258 ! }, /* alias for WIN1258 */ { "win", PG_WIN1251 }, /* _dirty_ alias for windows-1251 *************** *** 197,205 **** "win1256", PG_WIN1256 }, /* alias for Windows-1256 */ { ! "win1258", PG_TCVN }, /* alias for Windows-1258 */ { "win874", PG_WIN874 }, /* alias for Windows-874 */ { --- 200,211 ---- "win1256", PG_WIN1256 }, /* alias for Windows-1256 */ { ! "win1258", PG_WIN1258 }, /* alias for Windows-1258 */ { + "win866", PG_WIN866 + }, /* IBM866 */ + { "win874", PG_WIN874 }, /* alias for Windows-874 */ { *************** *** 224,232 **** "windows1256", PG_WIN1256 }, /* Windows-1256; Microsoft */ { ! "windows1258", PG_TCVN }, /* Windows-1258; Microsoft */ { "windows874", PG_WIN874 }, /* Windows-874; Microsoft */ { --- 230,241 ---- "windows1256", PG_WIN1256 }, /* Windows-1256; Microsoft */ { ! "windows1258", PG_WIN1258 }, /* Windows-1258; Microsoft */ { + "windows866", PG_WIN866 + }, /* IBM866 */ + { "windows874", PG_WIN874 }, /* Windows-874; Microsoft */ { *************** *** 275,281 **** "JOHAB", PG_JOHAB }, { ! "UNICODE", PG_UTF8 }, { "MULE_INTERNAL", PG_MULE_INTERNAL --- 284,290 ---- "JOHAB", PG_JOHAB }, { ! "UTF8", PG_UTF8 }, { "MULE_INTERNAL", PG_MULE_INTERNAL *************** *** 314,332 **** "WIN1256", PG_WIN1256 }, { ! "TCVN", PG_TCVN }, { ! "WIN874", PG_WIN874 }, { ! "KOI8", PG_KOI8R }, { ! "WIN", PG_WIN1251 }, { ! "ALT", PG_ALT }, { "ISO_8859_5", PG_ISO_8859_5 --- 323,341 ---- "WIN1256", PG_WIN1256 }, { ! "WIN1258", PG_WIN1258 }, { ! "WIN866", PG_WIN866 }, { ! "WIN874", PG_WIN874 }, { ! "KOI8", PG_KOI8R }, { ! "WIN1251", PG_WIN1251 }, { "ISO_8859_5", PG_ISO_8859_5 Index: src/backend/utils/mb/mbutils.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v retrieving revision 1.48 diff -c -c -r1.48 mbutils.c *** src/backend/utils/mb/mbutils.c 13 Oct 2004 01:25:12 -0000 1.48 --- src/backend/utils/mb/mbutils.c 3 Mar 2005 05:11:47 -0000 *************** *** 222,228 **** * * XXX We assume that storage for converted result is 4-to-1 growth in * the worst case. The rate for currently supported encoding pares are within 3 ! * (SJIS JIS X0201 half width kanna -> UTF-8 is the worst case). * So "4" should be enough for the moment. */ unsigned char * --- 222,228 ---- * * XXX We assume that storage for converted result is 4-to-1 growth in * the worst case. The rate for currently supported encoding pares are within 3 ! * (SJIS JIS X0201 half width kanna -> UTF8 is the worst case). * So "4" should be enough for the moment. */ unsigned char * Index: src/backend/utils/mb/wchar.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/wchar.c,v retrieving revision 1.40 diff -c -c -r1.40 wchar.c *** src/backend/utils/mb/wchar.c 3 Dec 2004 01:20:20 -0000 1.40 --- src/backend/utils/mb/wchar.c 3 Mar 2005 05:11:47 -0000 *************** *** 344,350 **** } /* ! * convert UTF-8 string to pg_wchar (UCS-2) * caller should allocate enough space for "to" * len: length of from. * "from" not necessarily null terminated. --- 344,350 ---- } /* ! * convert UTF8 string to pg_wchar (UCS-2) * caller should allocate enough space for "to" * len: length of from. * "from" not necessarily null terminated. *************** *** 395,401 **** } /* ! * returns the byte length of a UTF-8 word pointed to by s */ int pg_utf_mblen(const unsigned char *s) --- 395,401 ---- } /* ! * returns the byte length of a UTF8 word pointed to by s */ int pg_utf_mblen(const unsigned char *s) *************** *** 721,728 **** {pg_euckr2wchar_with_len, pg_euckr_mblen, pg_euckr_dsplen, 3}, /* 3; PG_EUC_KR */ {pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_dsplen, 3}, /* 4; PG_EUC_TW */ {pg_johab2wchar_with_len, pg_johab_mblen, pg_johab_dsplen, 3}, /* 5; PG_JOHAB */ ! {pg_utf2wchar_with_len, pg_utf_mblen, pg_utf_dsplen, 3}, /* 6; PG_UNICODE */ ! {pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_dsplen, 3}, /* 7; PG_MULE_INTERNAL */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 8; PG_LATIN1 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 9; PG_LATIN2 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 10; PG_LATIN3 */ --- 721,728 ---- {pg_euckr2wchar_with_len, pg_euckr_mblen, pg_euckr_dsplen, 3}, /* 3; PG_EUC_KR */ {pg_euctw2wchar_with_len, pg_euctw_mblen, pg_euctw_dsplen, 3}, /* 4; PG_EUC_TW */ {pg_johab2wchar_with_len, pg_johab_mblen, pg_johab_dsplen, 3}, /* 5; PG_JOHAB */ ! {pg_utf2wchar_with_len, pg_utf_mblen, pg_utf_dsplen, 3}, /* 6; PG_UTF8 */ ! {pg_mule2wchar_with_len, pg_mule_mblen, pg_mule_dsplen, 3}, /* 7; PG_MULE_INTERNAL */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 8; PG_LATIN1 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 9; PG_LATIN2 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 10; PG_LATIN3 */ *************** *** 822,828 **** while (len > 0 && *mbstr) { ! /* special UTF-8 check */ if (encoding == PG_UTF8 && (*mbstr & 0xf8) == 0xf0) { if (noError) --- 822,828 ---- while (len > 0 && *mbstr) { ! /* special UTF8 check */ if (encoding == PG_UTF8 && (*mbstr & 0xf8) == 0xf0) { if (noError) Index: src/backend/utils/mb/Unicode/UCS_to_8859.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_8859.pl,v retrieving revision 1.7 diff -c -c -r1.7 UCS_to_8859.pl *** src/backend/utils/mb/Unicode/UCS_to_8859.pl 1 Jan 2005 20:44:18 -0000 1.7 --- src/backend/utils/mb/Unicode/UCS_to_8859.pl 3 Mar 2005 05:11:47 -0000 *************** *** 39,45 **** if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 39,45 ---- if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 83,89 **** if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 83,89 ---- if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_BIG5.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_BIG5.pl *** src/backend/utils/mb/Unicode/UCS_to_BIG5.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_BIG5.pl 3 Mar 2005 05:11:47 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_EUC_CN.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl 3 Mar 2005 05:11:47 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_EUC_JP.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl 3 Mar 2005 05:11:47 -0000 *************** *** 51,57 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 51,57 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 80,86 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 80,86 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 108,114 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 108,114 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl,v retrieving revision 1.7 diff -c -c -r1.7 UCS_to_EUC_KR.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl 1 Jan 2005 20:44:18 -0000 1.7 --- src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl 3 Mar 2005 05:11:47 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_EUC_TW.pl *** src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl 3 Mar 2005 05:11:47 -0000 *************** *** 36,42 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 36,42 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_GB18030.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl,v retrieving revision 1.4 diff -c -c -r1.4 UCS_to_GB18030.pl *** src/backend/utils/mb/Unicode/UCS_to_GB18030.pl 29 Nov 2003 22:40:01 -0000 1.4 --- src/backend/utils/mb/Unicode/UCS_to_GB18030.pl 3 Mar 2005 05:11:47 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_GBK.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_GBK.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_GBK.pl *** src/backend/utils/mb/Unicode/UCS_to_GBK.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_GBK.pl 3 Mar 2005 05:11:48 -0000 *************** *** 36,42 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 36,42 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_JOHAB.pl *** src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl 3 Mar 2005 05:11:48 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_SJIS.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl,v retrieving revision 1.7 diff -c -c -r1.7 UCS_to_SJIS.pl *** src/backend/utils/mb/Unicode/UCS_to_SJIS.pl 1 Jan 2005 20:44:18 -0000 1.7 --- src/backend/utils/mb/Unicode/UCS_to_SJIS.pl 3 Mar 2005 05:11:48 -0000 *************** *** 52,58 **** || (( $code >= 0x879a ) && ( $code <= 0x879c ))) { ! printf STDERR "Warning: duplicate unicode : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code; next; } $count++; --- 52,58 ---- || (( $code >= 0x879a ) && ( $code <= 0x879c ))) { ! printf STDERR "Warning: duplicate UTF8 : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_UHC.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_UHC.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_UHC.pl *** src/backend/utils/mb/Unicode/UCS_to_UHC.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_UHC.pl 3 Mar 2005 05:11:48 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_WIN874.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_WIN874.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_WIN874.pl *** src/backend/utils/mb/Unicode/UCS_to_WIN874.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_WIN874.pl 3 Mar 2005 05:11:48 -0000 *************** *** 35,41 **** if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 35,41 ---- if( $code >= 0x80 && $ucs >= 0x0080 ){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_WINX.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_WINX.pl,v retrieving revision 1.5 diff -c -c -r1.5 UCS_to_WINX.pl *** src/backend/utils/mb/Unicode/UCS_to_WINX.pl 1 Jan 2005 20:44:18 -0000 1.5 --- src/backend/utils/mb/Unicode/UCS_to_WINX.pl 3 Mar 2005 05:11:48 -0000 *************** *** 42,48 **** if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 42,48 ---- if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 86,92 **** if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 86,92 ---- if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl,v retrieving revision 1.6 diff -c -c -r1.6 UCS_to_cyrillic.pl *** src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl 1 Jan 2005 20:44:18 -0000 1.6 --- src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl 3 Mar 2005 05:11:48 -0000 *************** *** 41,47 **** if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 41,47 ---- if( $code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; *************** *** 85,91 **** if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate unicode: %04x\n",$ucs; next; } $count++; --- 85,91 ---- if($code >= 0x80){ $utf = &ucs2utf($ucs); if( $array{ $utf } ne "" ){ ! printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs; next; } $count++; Index: src/backend/utils/mb/conversion_procs/Makefile =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/Makefile,v retrieving revision 1.11 diff -c -c -r1.11 Makefile *** src/backend/utils/mb/conversion_procs/Makefile 21 Jan 2004 19:22:19 -0000 1.11 --- src/backend/utils/mb/conversion_procs/Makefile 3 Mar 2005 05:11:48 -0000 *************** *** 23,29 **** utf8_and_ascii utf8_and_big5 utf8_and_cyrillic utf8_and_euc_cn \ utf8_and_euc_jp utf8_and_euc_kr utf8_and_euc_tw utf8_and_gb18030 \ utf8_and_gbk utf8_and_iso8859 utf8_and_iso8859_1 utf8_and_johab \ ! utf8_and_sjis utf8_and_tcvn utf8_and_uhc utf8_and_win1250 \ utf8_and_win1256 utf8_and_win874 # conversion_name source_encoding destination_encoding function object --- 23,29 ---- utf8_and_ascii utf8_and_big5 utf8_and_cyrillic utf8_and_euc_cn \ utf8_and_euc_jp utf8_and_euc_kr utf8_and_euc_tw utf8_and_gb18030 \ utf8_and_gbk utf8_and_iso8859 utf8_and_iso8859_1 utf8_and_johab \ ! utf8_and_sjis utf8_and_win1258 utf8_and_uhc utf8_and_win1250 \ utf8_and_win1256 utf8_and_win874 # conversion_name source_encoding destination_encoding function object *************** *** 36,55 **** mic_to_iso_8859_5 MULE_INTERNAL ISO-8859-5 mic_to_iso cyrillic_and_mic \ windows_1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic \ mic_to_windows_1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic \ ! windows_866_to_mic ALT MULE_INTERNAL alt_to_mic cyrillic_and_mic \ ! mic_to_windows_866 MULE_INTERNAL ALT mic_to_alt cyrillic_and_mic \ koi8_r_to_windows_1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic \ windows_1251_to_koi8_r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic \ ! koi8_r_to_windows_866 KOI8R ALT koi8r_to_alt cyrillic_and_mic \ ! windows_866_to_koi8_r ALT KOI8R alt_to_koi8r cyrillic_and_mic \ ! windows_866_to_windows_1251 ALT WIN1251 alt_to_win1251 cyrillic_and_mic \ ! windows_1251_to_windows_866 WIN1251 ALT win1251_to_alt cyrillic_and_mic \ iso_8859_5_to_koi8_r ISO-8859-5 KOI8R iso_to_koi8r cyrillic_and_mic \ koi8_r_to_iso_8859_5 KOI8R ISO-8859-5 koi8r_to_iso cyrillic_and_mic \ iso_8859_5_to_windows_1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic \ windows_1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic \ ! iso_8859_5_to_windows_866 ISO-8859-5 ALT iso_to_alt cyrillic_and_mic \ ! windows_866_to_iso_8859_5 ALT ISO-8859-5 alt_to_iso cyrillic_and_mic \ euc_cn_to_mic EUC_CN MULE_INTERNAL euc_cn_to_mic euc_cn_and_mic \ mic_to_euc_cn MULE_INTERNAL EUC_CN mic_to_euc_cn euc_cn_and_mic \ euc_jp_to_sjis EUC_JP SJIS euc_jp_to_sjis euc_jp_and_sjis \ --- 36,55 ---- mic_to_iso_8859_5 MULE_INTERNAL ISO-8859-5 mic_to_iso cyrillic_and_mic \ windows_1251_to_mic WIN1251 MULE_INTERNAL win1251_to_mic cyrillic_and_mic \ mic_to_windows_1251 MULE_INTERNAL WIN1251 mic_to_win1251 cyrillic_and_mic \ ! windows_866_to_mic WIN866 MULE_INTERNAL win866_to_mic cyrillic_and_mic \ ! mic_to_windows_866 MULE_INTERNAL WIN866 mic_to_win866 cyrillic_and_mic \ koi8_r_to_windows_1251 KOI8R WIN1251 koi8r_to_win1251 cyrillic_and_mic \ windows_1251_to_koi8_r WIN1251 KOI8R win1251_to_koi8r cyrillic_and_mic \ ! koi8_r_to_windows_866 KOI8R WIN866 koi8r_to_win866 cyrillic_and_mic \ ! windows_866_to_koi8_r WIN866 KOI8R win866_to_koi8r cyrillic_and_mic \ ! windows_866_to_windows_1251 WIN866 WIN1251 win866_to_win1251 cyrillic_and_mic \ ! windows_1251_to_windows_866 WIN1251 WIN866 win1251_to_win866 cyrillic_and_mic \ iso_8859_5_to_koi8_r ISO-8859-5 KOI8R iso_to_koi8r cyrillic_and_mic \ koi8_r_to_iso_8859_5 KOI8R ISO-8859-5 koi8r_to_iso cyrillic_and_mic \ iso_8859_5_to_windows_1251 ISO-8859-5 WIN1251 iso_to_win1251 cyrillic_and_mic \ windows_1251_to_iso_8859_5 WIN1251 ISO-8859-5 win1251_to_iso cyrillic_and_mic \ ! iso_8859_5_to_windows_866 ISO-8859-5 WIN866 iso_to_win866 cyrillic_and_mic \ ! windows_866_to_iso_8859_5 WIN866 ISO-8859-5 win866_to_iso cyrillic_and_mic \ euc_cn_to_mic EUC_CN MULE_INTERNAL euc_cn_to_mic euc_cn_and_mic \ mic_to_euc_cn MULE_INTERNAL EUC_CN mic_to_euc_cn euc_cn_and_mic \ euc_jp_to_sjis EUC_JP SJIS euc_jp_to_sjis euc_jp_and_sjis \ *************** *** 78,147 **** mic_to_iso_8859_3 MULE_INTERNAL LATIN3 mic_to_latin3 latin_and_mic \ iso_8859_4_to_mic LATIN4 MULE_INTERNAL latin4_to_mic latin_and_mic \ mic_to_iso_8859_4 MULE_INTERNAL LATIN4 mic_to_latin4 latin_and_mic \ ! ascii_to_utf_8 SQL_ASCII UNICODE ascii_to_utf8 utf8_and_ascii \ ! utf_8_to_ascii UNICODE SQL_ASCII utf8_to_ascii utf8_and_ascii \ ! big5_to_utf_8 BIG5 UNICODE big5_to_utf8 utf8_and_big5 \ ! utf_8_to_big5 UNICODE BIG5 utf8_to_big5 utf8_and_big5 \ ! utf_8_to_koi8_r UNICODE KOI8R utf8_to_koi8r utf8_and_cyrillic \ ! koi8_r_to_utf_8 KOI8R UNICODE koi8r_to_utf8 utf8_and_cyrillic \ ! utf_8_to_windows_1251 UNICODE WIN1251 utf8_to_win1251 utf8_and_cyrillic \ ! windows_1251_to_utf_8 WIN1251 UNICODE win1251_to_utf8 utf8_and_cyrillic \ ! utf_8_to_windows_866 UNICODE ALT utf8_to_alt utf8_and_cyrillic \ ! windows_866_to_utf_8 ALT UNICODE alt_to_utf8 utf8_and_cyrillic \ ! euc_cn_to_utf_8 EUC_CN UNICODE euc_cn_to_utf8 utf8_and_euc_cn \ ! utf_8_to_euc_cn UNICODE EUC_CN utf8_to_euc_cn utf8_and_euc_cn \ ! euc_jp_to_utf_8 EUC_JP UNICODE euc_jp_to_utf8 utf8_and_euc_jp \ ! utf_8_to_euc_jp UNICODE EUC_JP utf8_to_euc_jp utf8_and_euc_jp \ ! euc_kr_to_utf_8 EUC_KR UNICODE euc_kr_to_utf8 utf8_and_euc_kr \ ! utf_8_to_euc_kr UNICODE EUC_KR utf8_to_euc_kr utf8_and_euc_kr \ ! euc_tw_to_utf_8 EUC_TW UNICODE euc_tw_to_utf8 utf8_and_euc_tw \ ! utf_8_to_euc_tw UNICODE EUC_TW utf8_to_euc_tw utf8_and_euc_tw \ ! gb18030_to_utf_8 GB18030 UNICODE gb18030_to_utf8 utf8_and_gb18030 \ ! utf_8_to_gb18030 UNICODE GB18030 utf8_to_gb18030 utf8_and_gb18030 \ ! gbk_to_utf_8 GBK UNICODE gbk_to_utf8 utf8_and_gbk \ ! utf_8_to_gbk UNICODE GBK utf8_to_gbk utf8_and_gbk \ ! utf_8_to_iso_8859_2 UNICODE LATIN2 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_2_to_utf_8 LATIN2 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_3 UNICODE LATIN3 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_3_to_utf_8 LATIN3 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_4 UNICODE LATIN4 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_4_to_utf_8 LATIN4 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_9 UNICODE LATIN5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_9_to_utf_8 LATIN5 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_10 UNICODE LATIN6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_10_to_utf_8 LATIN6 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_13 UNICODE LATIN7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_13_to_utf_8 LATIN7 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_14 UNICODE LATIN8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_14_to_utf_8 LATIN8 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_15 UNICODE LATIN9 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_15_to_utf_8 LATIN9 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_16 UNICODE LATIN10 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_16_to_utf_8 LATIN10 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_5 UNICODE ISO-8859-5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_5_to_utf_8 ISO-8859-5 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_6 UNICODE ISO-8859-6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_6_to_utf_8 ISO-8859-6 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_7 UNICODE ISO-8859-7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_7_to_utf_8 ISO-8859-7 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! utf_8_to_iso_8859_8 UNICODE ISO-8859-8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_8_to_utf_8 ISO-8859-8 UNICODE iso8859_to_utf8 utf8_and_iso8859 \ ! iso_8859_1_to_utf_8 LATIN1 UNICODE iso8859_1_to_utf8 utf8_and_iso8859_1 \ ! utf_8_to_iso_8859_1 UNICODE LATIN1 utf8_to_iso8859_1 utf8_and_iso8859_1 \ ! johab_to_utf_8 JOHAB UNICODE johab_to_utf8 utf8_and_johab \ ! utf_8_to_johab UNICODE JOHAB utf8_to_johab utf8_and_johab \ ! sjis_to_utf_8 SJIS UNICODE sjis_to_utf8 utf8_and_sjis \ ! utf_8_to_sjis UNICODE SJIS utf8_to_sjis utf8_and_sjis \ ! tcvn_to_utf_8 TCVN UNICODE tcvn_to_utf8 utf8_and_tcvn \ ! utf_8_to_tcvn UNICODE TCVN utf8_to_tcvn utf8_and_tcvn \ ! uhc_to_utf_8 UHC UNICODE uhc_to_utf8 utf8_and_uhc \ ! utf_8_to_uhc UNICODE UHC utf8_to_uhc utf8_and_uhc \ ! utf_8_to_windows_1250 UNICODE WIN1250 utf_to_win1250 utf8_and_win1250 \ ! windows_1250_to_utf_8 WIN1250 UNICODE win1250_to_utf utf8_and_win1250 \ ! utf_8_to_windows_1256 UNICODE WIN1256 utf_to_win1256 utf8_and_win1256 \ ! windows_1256_to_utf_8 WIN1256 UNICODE win1256_to_utf utf8_and_win1256 \ ! utf_8_to_windows_874 UNICODE WIN874 utf_to_win874 utf8_and_win874 \ ! windows_874_to_utf_8 WIN874 UNICODE win874_to_utf utf8_and_win874 all: $(SQLSCRIPT) @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done --- 78,147 ---- mic_to_iso_8859_3 MULE_INTERNAL LATIN3 mic_to_latin3 latin_and_mic \ iso_8859_4_to_mic LATIN4 MULE_INTERNAL latin4_to_mic latin_and_mic \ mic_to_iso_8859_4 MULE_INTERNAL LATIN4 mic_to_latin4 latin_and_mic \ ! ascii_to_utf8 SQL_ASCII UTF8 ascii_to_utf8 utf8_and_ascii \ ! utf8_to_ascii UTF8 SQL_ASCII utf8_to_ascii utf8_and_ascii \ ! big5_to_utf8 BIG5 UTF8 big5_to_utf8 utf8_and_big5 \ ! utf8_to_big5 UTF8 BIG5 utf8_to_big5 utf8_and_big5 \ ! utf8_to_koi8_r UTF8 KOI8R utf8_to_koi8r utf8_and_cyrillic \ ! koi8_r_to_utf8 KOI8R UTF8 koi8r_to_utf8 utf8_and_cyrillic \ ! utf8_to_windows_1251 UTF8 WIN1251 utf8_to_win1251 utf8_and_cyrillic \ ! windows_1251_to_utf8 WIN1251 UTF8 win1251_to_utf8 utf8_and_cyrillic \ ! utf8_to_windows_866 UTF8 WIN866 utf8_to_win866 utf8_and_cyrillic \ ! windows_866_to_utf8 WIN866 UTF8 win866_to_utf8 utf8_and_cyrillic \ ! euc_cn_to_utf8 EUC_CN UTF8 euc_cn_to_utf8 utf8_and_euc_cn \ ! utf8_to_euc_cn UTF8 EUC_CN utf8_to_euc_cn utf8_and_euc_cn \ ! euc_jp_to_utf8 EUC_JP UTF8 euc_jp_to_utf8 utf8_and_euc_jp \ ! utf8_to_euc_jp UTF8 EUC_JP utf8_to_euc_jp utf8_and_euc_jp \ ! euc_kr_to_utf8 EUC_KR UTF8 euc_kr_to_utf8 utf8_and_euc_kr \ ! utf8_to_euc_kr UTF8 EUC_KR utf8_to_euc_kr utf8_and_euc_kr \ ! euc_tw_to_utf8 EUC_TW UTF8 euc_tw_to_utf8 utf8_and_euc_tw \ ! utf8_to_euc_tw UTF8 EUC_TW utf8_to_euc_tw utf8_and_euc_tw \ ! gb18030_to_utf8 GB18030 UTF8 gb18030_to_utf8 utf8_and_gb18030 \ ! utf8_to_gb18030 UTF8 GB18030 utf8_to_gb18030 utf8_and_gb18030 \ ! gbk_to_utf8 GBK UTF8 gbk_to_utf8 utf8_and_gbk \ ! utf8_to_gbk UTF8 GBK utf8_to_gbk utf8_and_gbk \ ! utf8_to_iso_8859_2 UTF8 LATIN2 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_2_to_utf8 LATIN2 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_3 UTF8 LATIN3 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_3_to_utf8 LATIN3 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_4 UTF8 LATIN4 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_4_to_utf8 LATIN4 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_9 UTF8 LATIN5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_9_to_utf8 LATIN5 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_10 UTF8 LATIN6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_10_to_utf8 LATIN6 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_13 UTF8 LATIN7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_13_to_utf8 LATIN7 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_14 UTF8 LATIN8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_14_to_utf8 LATIN8 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_15 UTF8 LATIN9 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_15_to_utf8 LATIN9 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_16 UTF8 LATIN10 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_16_to_utf8 LATIN10 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_5 UTF8 ISO-8859-5 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_5_to_utf8 ISO-8859-5 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_6 UTF8 ISO-8859-6 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_6_to_utf8 ISO-8859-6 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_7 UTF8 ISO-8859-7 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_7_to_utf8 ISO-8859-7 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! utf8_to_iso_8859_8 UTF8 ISO-8859-8 utf8_to_iso8859 utf8_and_iso8859 \ ! iso_8859_8_to_utf8 ISO-8859-8 UTF8 iso8859_to_utf8 utf8_and_iso8859 \ ! iso_8859_1_to_utf8 LATIN1 UTF8 iso8859_1_to_utf8 utf8_and_iso8859_1 \ ! utf8_to_iso_8859_1 UTF8 LATIN1 utf8_to_iso8859_1 utf8_and_iso8859_1 \ ! johab_to_utf8 JOHAB UTF8 johab_to_utf8 utf8_and_johab \ ! utf8_to_johab UTF8 JOHAB utf8_to_johab utf8_and_johab \ ! sjis_to_utf8 SJIS UTF8 sjis_to_utf8 utf8_and_sjis \ ! utf8_to_sjis UTF8 SJIS utf8_to_sjis utf8_and_sjis \ ! win1258_to_utf8 WIN1258 UTF8 win1258_to_utf8 utf8_and_win1258 \ ! utf8_to_win1258 UTF8 WIN1258 utf8_to_win1258 utf8_and_win1258 \ ! uhc_to_utf8 UHC UTF8 uhc_to_utf8 utf8_and_uhc \ ! utf8_to_uhc UTF8 UHC utf8_to_uhc utf8_and_uhc \ ! utf8_to_windows_1250 UTF8 WIN1250 utf_to_win1250 utf8_and_win1250 \ ! windows_1250_to_utf8 WIN1250 UTF8 win1250_to_utf utf8_and_win1250 \ ! utf8_to_windows_1256 UTF8 WIN1256 utf_to_win1256 utf8_and_win1256 \ ! windows_1256_to_utf8 WIN1256 UTF8 win1256_to_utf utf8_and_win1256 \ ! utf8_to_windows_874 UTF8 WIN874 utf_to_win874 utf8_and_win874 \ ! windows_874_to_utf8 WIN874 UTF8 win874_to_utf utf8_and_win874 all: $(SQLSCRIPT) @for dir in $(DIRS); do $(MAKE) -C $$dir $@ || exit; done Index: src/backend/utils/mb/conversion_procs/regress_prolog =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/regress_prolog,v retrieving revision 1.2 diff -c -c -r1.2 regress_prolog *** src/backend/utils/mb/conversion_procs/regress_prolog 4 Sep 2002 02:42:34 -0000 1.2 --- src/backend/utils/mb/conversion_procs/regress_prolog 3 Mar 2005 05:11:48 -0000 *************** *** 3,21 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- drop user defined conversion -- --- 3,21 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- drop user defined conversion -- Index: src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c,v retrieving revision 1.9 diff -c -c -r1.9 cyrillic_and_mic.c *** src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c 31 Dec 2004 22:01:48 -0000 1.9 --- src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c 3 Mar 2005 05:11:48 -0000 *************** *** 23,42 **** PG_FUNCTION_INFO_V1(mic_to_iso); PG_FUNCTION_INFO_V1(win1251_to_mic); PG_FUNCTION_INFO_V1(mic_to_win1251); ! PG_FUNCTION_INFO_V1(alt_to_mic); ! PG_FUNCTION_INFO_V1(mic_to_alt); PG_FUNCTION_INFO_V1(koi8r_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_koi8r); ! PG_FUNCTION_INFO_V1(koi8r_to_alt); ! PG_FUNCTION_INFO_V1(alt_to_koi8r); ! PG_FUNCTION_INFO_V1(alt_to_win1251); ! PG_FUNCTION_INFO_V1(win1251_to_alt); PG_FUNCTION_INFO_V1(iso_to_koi8r); PG_FUNCTION_INFO_V1(koi8r_to_iso); PG_FUNCTION_INFO_V1(iso_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_iso); ! PG_FUNCTION_INFO_V1(iso_to_alt); ! PG_FUNCTION_INFO_V1(alt_to_iso); extern Datum koi8r_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_koi8r(PG_FUNCTION_ARGS); --- 23,42 ---- PG_FUNCTION_INFO_V1(mic_to_iso); PG_FUNCTION_INFO_V1(win1251_to_mic); PG_FUNCTION_INFO_V1(mic_to_win1251); ! PG_FUNCTION_INFO_V1(win866_to_mic); ! PG_FUNCTION_INFO_V1(mic_to_win866); PG_FUNCTION_INFO_V1(koi8r_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_koi8r); ! PG_FUNCTION_INFO_V1(koi8r_to_win866); ! PG_FUNCTION_INFO_V1(win866_to_koi8r); ! PG_FUNCTION_INFO_V1(win866_to_win1251); ! PG_FUNCTION_INFO_V1(win1251_to_win866); PG_FUNCTION_INFO_V1(iso_to_koi8r); PG_FUNCTION_INFO_V1(koi8r_to_iso); PG_FUNCTION_INFO_V1(iso_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_iso); ! PG_FUNCTION_INFO_V1(iso_to_win866); ! PG_FUNCTION_INFO_V1(win866_to_iso); extern Datum koi8r_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_koi8r(PG_FUNCTION_ARGS); *************** *** 44,63 **** extern Datum mic_to_iso(PG_FUNCTION_ARGS); extern Datum win1251_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_win1251(PG_FUNCTION_ARGS); ! extern Datum alt_to_mic(PG_FUNCTION_ARGS); ! extern Datum mic_to_alt(PG_FUNCTION_ARGS); extern Datum koi8r_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum koi8r_to_alt(PG_FUNCTION_ARGS); ! extern Datum alt_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum alt_to_win1251(PG_FUNCTION_ARGS); ! extern Datum win1251_to_alt(PG_FUNCTION_ARGS); extern Datum iso_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_iso(PG_FUNCTION_ARGS); extern Datum iso_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_iso(PG_FUNCTION_ARGS); ! extern Datum iso_to_alt(PG_FUNCTION_ARGS); ! extern Datum alt_to_iso(PG_FUNCTION_ARGS); /* ---------- * conv_proc( --- 44,63 ---- extern Datum mic_to_iso(PG_FUNCTION_ARGS); extern Datum win1251_to_mic(PG_FUNCTION_ARGS); extern Datum mic_to_win1251(PG_FUNCTION_ARGS); ! extern Datum win866_to_mic(PG_FUNCTION_ARGS); ! extern Datum mic_to_win866(PG_FUNCTION_ARGS); extern Datum koi8r_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum koi8r_to_win866(PG_FUNCTION_ARGS); ! extern Datum win866_to_koi8r(PG_FUNCTION_ARGS); ! extern Datum win866_to_win1251(PG_FUNCTION_ARGS); ! extern Datum win1251_to_win866(PG_FUNCTION_ARGS); extern Datum iso_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_iso(PG_FUNCTION_ARGS); extern Datum iso_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_iso(PG_FUNCTION_ARGS); ! extern Datum iso_to_win866(PG_FUNCTION_ARGS); ! extern Datum win866_to_iso(PG_FUNCTION_ARGS); /* ---------- * conv_proc( *************** *** 176,188 **** } Datum ! alt_to_mic(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL); Assert(len >= 0); --- 176,188 ---- } Datum ! win866_to_mic(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL); Assert(len >= 0); *************** *** 192,205 **** } Datum ! mic_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_MULE_INTERNAL); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); mic2alt(src, dest, len); --- 192,205 ---- } Datum ! mic_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_MULE_INTERNAL); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); mic2alt(src, dest, len); *************** *** 248,254 **** } Datum ! koi8r_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); --- 248,254 ---- } Datum ! koi8r_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); *************** *** 256,262 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_KOI8R); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 256,262 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_KOI8R); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 268,281 **** } Datum ! alt_to_koi8r(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_KOI8R); Assert(len >= 0); --- 268,281 ---- } Datum ! win866_to_koi8r(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_KOI8R); Assert(len >= 0); *************** *** 288,301 **** } Datum ! alt_to_win1251(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_WIN1251); Assert(len >= 0); --- 288,301 ---- } Datum ! win866_to_win1251(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_WIN1251); Assert(len >= 0); *************** *** 308,314 **** } Datum ! win1251_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); --- 308,314 ---- } Datum ! win1251_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); *************** *** 316,322 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_WIN1251); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 316,322 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_WIN1251); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 408,414 **** } Datum ! iso_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); --- 408,414 ---- } Datum ! iso_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); *************** *** 416,422 **** unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); --- 416,422 ---- unsigned char *buf; Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); buf = palloc(len * ENCODING_GROWTH_RATE); *************** *** 428,441 **** } Datum ! alt_to_iso(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5); Assert(len >= 0); --- 428,441 ---- } Datum ! win866_to_iso(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); unsigned char *buf; ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5); Assert(len >= 0); Index: src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_ascii.c *** src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c 31 Dec 2004 22:02:11 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c 3 Mar 2005 05:11:48 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ASCII <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ASCII <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_big5.c *** src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c 31 Dec 2004 22:02:13 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c 3 Mar 2005 05:11:48 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * BIG5 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * BIG5 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_cyrillic.c *** src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c 31 Dec 2004 22:02:14 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c 3 Mar 2005 05:11:49 -0000 *************** *** 25,39 **** PG_FUNCTION_INFO_V1(koi8r_to_utf8); PG_FUNCTION_INFO_V1(utf8_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_alt); ! PG_FUNCTION_INFO_V1(alt_to_utf8); extern Datum utf8_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_utf8(PG_FUNCTION_ARGS); extern Datum utf8_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_alt(PG_FUNCTION_ARGS); ! extern Datum alt_to_utf8(PG_FUNCTION_ARGS); /* ---------- * conv_proc( --- 25,39 ---- PG_FUNCTION_INFO_V1(koi8r_to_utf8); PG_FUNCTION_INFO_V1(utf8_to_win1251); PG_FUNCTION_INFO_V1(win1251_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_win866); ! PG_FUNCTION_INFO_V1(win866_to_utf8); extern Datum utf8_to_koi8r(PG_FUNCTION_ARGS); extern Datum koi8r_to_utf8(PG_FUNCTION_ARGS); extern Datum utf8_to_win1251(PG_FUNCTION_ARGS); extern Datum win1251_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_win866(PG_FUNCTION_ARGS); ! extern Datum win866_to_utf8(PG_FUNCTION_ARGS); /* ---------- * conv_proc( *************** *** 115,128 **** } Datum ! utf8_to_alt(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_ALT); Assert(len >= 0); UtfToLocal(src, dest, ULmap_ALT, --- 115,128 ---- } Datum ! utf8_to_win866(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_WIN866); Assert(len >= 0); UtfToLocal(src, dest, ULmap_ALT, *************** *** 132,149 **** } Datum ! alt_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_ALT); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapALT, ! sizeof(LUmapALT) / sizeof(pg_local_to_utf), PG_ALT, len); PG_RETURN_VOID(); } --- 132,149 ---- } Datum ! win866_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN866); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapALT, ! sizeof(LUmapALT) / sizeof(pg_local_to_utf), PG_WIN866, len); PG_RETURN_VOID(); } Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_cn.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c 31 Dec 2004 22:02:16 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_CN <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_CN <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_jp.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c 31 Dec 2004 22:02:17 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_JP <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_JP <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_kr.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c 31 Dec 2004 22:02:19 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_KR <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_KR <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_euc_tw.c *** src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c 31 Dec 2004 22:02:20 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * EUC_TW <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * EUC_TW <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_gb18030.c *** src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c 31 Dec 2004 22:02:23 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * GB18030 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * GB18030 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_gbk.c *** src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c 31 Dec 2004 22:02:26 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * GBK <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * GBK <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c,v retrieving revision 1.11 diff -c -c -r1.11 utf8_and_iso8859.c *** src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c 31 Dec 2004 22:02:27 -0000 1.11 --- src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ISO 8859 2-16 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ISO 8859 2-16 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 61,68 **** typedef struct { pg_enc encoding; ! pg_local_to_utf *map1; /* to UTF-8 map name */ ! pg_utf_to_local *map2; /* from UTF-8 map name */ int size1; /* size of map1 */ int size2; /* size of map2 */ } pg_conv_map; --- 61,68 ---- typedef struct { pg_enc encoding; ! pg_local_to_utf *map1; /* to UTF8 map name */ ! pg_utf_to_local *map2; /* from UTF8 map name */ int size1; /* size of map1 */ int size2; /* size of map2 */ } pg_conv_map; *************** *** 74,80 **** {PG_EUC_KR}, /* EUC for Korean */ {PG_EUC_TW}, /* EUC for Taiwan */ {PG_JOHAB}, /* EUC for Korean JOHAB */ ! {PG_UTF8}, /* Unicode UTF-8 */ {PG_MULE_INTERNAL}, /* Mule internal code */ {PG_LATIN1}, /* ISO-8859-1 Latin 1 */ {PG_LATIN2, LUmapISO8859_2, ULmapISO8859_2, --- 74,80 ---- {PG_EUC_KR}, /* EUC for Korean */ {PG_EUC_TW}, /* EUC for Taiwan */ {PG_JOHAB}, /* EUC for Korean JOHAB */ ! {PG_UTF8}, /* Unicode UTF8 */ {PG_MULE_INTERNAL}, /* Mule internal code */ {PG_LATIN1}, /* ISO-8859-1 Latin 1 */ {PG_LATIN2, LUmapISO8859_2, ULmapISO8859_2, *************** *** 105,115 **** sizeof(LUmapISO8859_16) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_16) / sizeof(pg_utf_to_local)}, /* ISO-8859-16 Latin 10 */ {PG_WIN1256}, /* windows-1256 */ ! {PG_TCVN}, /* TCVN (Windows-1258) */ {PG_WIN874}, /* windows-874 */ {PG_KOI8R}, /* KOI8-R */ {PG_WIN1251}, /* windows-1251 (was: WIN) */ ! {PG_ALT}, /* (MS-DOS CP866) */ {PG_ISO_8859_5, LUmapISO8859_5, ULmapISO8859_5, sizeof(LUmapISO8859_5) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_5) / sizeof(pg_utf_to_local)}, /* ISO-8859-5 */ --- 105,115 ---- sizeof(LUmapISO8859_16) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_16) / sizeof(pg_utf_to_local)}, /* ISO-8859-16 Latin 10 */ {PG_WIN1256}, /* windows-1256 */ ! {PG_WIN1258}, /* Windows-1258 */ {PG_WIN874}, /* windows-874 */ {PG_KOI8R}, /* KOI8-R */ {PG_WIN1251}, /* windows-1251 (was: WIN) */ ! {PG_WIN866}, /* (MS-DOS CP866) */ {PG_ISO_8859_5, LUmapISO8859_5, ULmapISO8859_5, sizeof(LUmapISO8859_5) / sizeof(pg_local_to_utf), sizeof(ULmapISO8859_5) / sizeof(pg_utf_to_local)}, /* ISO-8859-5 */ Index: src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c,v retrieving revision 1.10 diff -c -c -r1.10 utf8_and_iso8859_1.c *** src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 31 Dec 2004 22:02:29 -0000 1.10 --- src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * ISO8859_1 <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * ISO8859_1 <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 84,90 **** len -= 2; } else if ((c & 0xe0) == 0xe0) ! elog(ERROR, "could not convert UTF-8 character 0x%04x to ISO8859-1", c); else { --- 84,90 ---- len -= 2; } else if ((c & 0xe0) == 0xe0) ! elog(ERROR, "could not convert UTF8 character 0x%04x to ISO8859-1", c); else { Index: src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_johab.c *** src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 31 Dec 2004 22:02:31 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * JOHAB <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * JOHAB <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_sjis.c *** src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 31 Dec 2004 22:02:33 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * SJIS <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * SJIS <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_tcvn.c *** src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c 31 Dec 2004 22:02:35 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_tcvn/utf8_and_tcvn.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * TCVN <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * TCVN <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California *************** *** 17,27 **** #include "../../Unicode/tcvn_to_utf8.map" #include "../../Unicode/utf8_to_tcvn.map" ! PG_FUNCTION_INFO_V1(tcvn_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_tcvn); ! extern Datum tcvn_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_tcvn(PG_FUNCTION_ARGS); /* ---------- * conv_proc( --- 17,27 ---- #include "../../Unicode/tcvn_to_utf8.map" #include "../../Unicode/utf8_to_tcvn.map" ! PG_FUNCTION_INFO_V1(win1258_to_utf8); ! PG_FUNCTION_INFO_V1(utf8_to_win1258); ! extern Datum win1258_to_utf8(PG_FUNCTION_ARGS); ! extern Datum utf8_to_win1258(PG_FUNCTION_ARGS); /* ---------- * conv_proc( *************** *** 34,64 **** * ---------- */ Datum ! tcvn_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_TCVN); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapTCVN, ! sizeof(LUmapTCVN) / sizeof(pg_local_to_utf), PG_TCVN, len); PG_RETURN_VOID(); } Datum ! utf8_to_tcvn(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_TCVN); Assert(len >= 0); UtfToLocal(src, dest, ULmapTCVN, --- 34,64 ---- * ---------- */ Datum ! win1258_to_utf8(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); ! Assert(PG_GETARG_INT32(0) == PG_WIN1258); Assert(PG_GETARG_INT32(1) == PG_UTF8); Assert(len >= 0); LocalToUtf(src, dest, LUmapTCVN, ! sizeof(LUmapTCVN) / sizeof(pg_local_to_utf), PG_WIN1258, len); PG_RETURN_VOID(); } Datum ! utf8_to_win1258(PG_FUNCTION_ARGS) { unsigned char *src = PG_GETARG_CSTRING(2); unsigned char *dest = PG_GETARG_CSTRING(3); int len = PG_GETARG_INT32(4); Assert(PG_GETARG_INT32(0) == PG_UTF8); ! Assert(PG_GETARG_INT32(1) == PG_WIN1258); Assert(len >= 0); UtfToLocal(src, dest, ULmapTCVN, Index: src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_uhc.c *** src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 31 Dec 2004 22:02:36 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * UHC <--> UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * UHC <--> UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win1250.c *** src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c 31 Dec 2004 22:02:38 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN1250 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN1250 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win1256.c *** src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c 31 Dec 2004 22:02:39 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN1256 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN1256 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c,v retrieving revision 1.9 diff -c -c -r1.9 utf8_and_win874.c *** src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c 31 Dec 2004 22:02:41 -0000 1.9 --- src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c 3 Mar 2005 05:11:49 -0000 *************** *** 1,6 **** /*------------------------------------------------------------------------- * ! * WIN874 and UTF-8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California --- 1,6 ---- /*------------------------------------------------------------------------- * ! * WIN874 and UTF8 * * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California Index: src/bin/initdb/initdb.c =================================================================== RCS file: /cvsroot/pgsql/src/bin/initdb/initdb.c,v retrieving revision 1.76 diff -c -c -r1.76 initdb.c *** src/bin/initdb/initdb.c 26 Feb 2005 18:43:34 -0000 1.76 --- src/bin/initdb/initdb.c 3 Mar 2005 05:11:51 -0000 *************** *** 723,729 **** {PG_JOHAB, "???"}, #endif ! {PG_UTF8, "UTF-8"}, {PG_UTF8, "utf8"}, {PG_LATIN1, "ISO-8859-1"}, --- 723,729 ---- {PG_JOHAB, "???"}, #endif ! {PG_UTF8, "UTF8"}, {PG_UTF8, "utf8"}, {PG_LATIN1, "ISO-8859-1"}, *************** *** 767,779 **** {PG_LATIN10, "iso885916"}, {PG_WIN1256, "CP1256"}, ! {PG_TCVN, "CP1258"}, #ifdef NOT_VERIFIED {PG_WIN874, "???"}, #endif {PG_KOI8R, "KOI8-R"}, {PG_WIN1251, "CP1251"}, ! {PG_ALT, "CP866"}, {PG_ISO_8859_5, "ISO-8859-5"}, {PG_ISO_8859_5, "ISO8859-5"}, --- 767,779 ---- {PG_LATIN10, "iso885916"}, {PG_WIN1256, "CP1256"}, ! {PG_WIN1258, "CP1258"}, #ifdef NOT_VERIFIED {PG_WIN874, "???"}, #endif {PG_KOI8R, "KOI8-R"}, {PG_WIN1251, "CP1251"}, ! {PG_WIN866, "CP866"}, {PG_ISO_8859_5, "ISO-8859-5"}, {PG_ISO_8859_5, "ISO8859-5"}, Index: src/include/mb/pg_wchar.h =================================================================== RCS file: /cvsroot/pgsql/src/include/mb/pg_wchar.h,v retrieving revision 1.56 diff -c -c -r1.56 pg_wchar.h *** src/include/mb/pg_wchar.h 4 Dec 2004 18:19:33 -0000 1.56 --- src/include/mb/pg_wchar.h 3 Mar 2005 05:11:52 -0000 *************** *** 155,161 **** PG_EUC_KR, /* EUC for Korean */ PG_EUC_TW, /* EUC for Taiwan */ PG_JOHAB, /* EUC for Korean JOHAB */ ! PG_UTF8, /* Unicode UTF-8 */ PG_MULE_INTERNAL, /* Mule internal code */ PG_LATIN1, /* ISO-8859-1 Latin 1 */ PG_LATIN2, /* ISO-8859-2 Latin 2 */ --- 155,161 ---- PG_EUC_KR, /* EUC for Korean */ PG_EUC_TW, /* EUC for Taiwan */ PG_JOHAB, /* EUC for Korean JOHAB */ ! PG_UTF8, /* Unicode UTF8 */ PG_MULE_INTERNAL, /* Mule internal code */ PG_LATIN1, /* ISO-8859-1 Latin 1 */ PG_LATIN2, /* ISO-8859-2 Latin 2 */ *************** *** 168,178 **** PG_LATIN9, /* ISO-8859-15 Latin9 */ PG_LATIN10, /* ISO-8859-16 Latin10 */ PG_WIN1256, /* windows-1256 */ ! PG_TCVN, /* TCVN (Windows-1258) */ PG_WIN874, /* windows-874 */ PG_KOI8R, /* KOI8-R */ PG_WIN1251, /* windows-1251 (was: WIN) */ - PG_ALT, /* (MS-DOS CP866) */ PG_ISO_8859_5, /* ISO-8859-5 */ PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_7, /* ISO-8859-7 */ --- 168,178 ---- PG_LATIN9, /* ISO-8859-15 Latin9 */ PG_LATIN10, /* ISO-8859-16 Latin10 */ PG_WIN1256, /* windows-1256 */ ! PG_WIN1258, /* Windows-1258 */ ! PG_WIN866, /* (MS-DOS CP866) */ PG_WIN874, /* windows-874 */ PG_KOI8R, /* KOI8-R */ PG_WIN1251, /* windows-1251 (was: WIN) */ PG_ISO_8859_5, /* ISO-8859-5 */ PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_7, /* ISO-8859-7 */ *************** *** 263,283 **** extern pg_wchar_tbl pg_wchar_table[]; /* ! * UTF-8 to local code conversion map */ typedef struct { ! unsigned int utf; /* UTF-8 */ unsigned int code; /* local code */ } pg_utf_to_local; /* ! * local code to UTF-8 conversion map */ typedef struct { unsigned int code; /* local code */ ! unsigned int utf; /* UTF-8 */ } pg_local_to_utf; extern int pg_mb2wchar(const unsigned char *from, pg_wchar *to); --- 263,283 ---- extern pg_wchar_tbl pg_wchar_table[]; /* ! * UTF8 to local code conversion map */ typedef struct { ! unsigned int utf; /* UTF8 */ unsigned int code; /* local code */ } pg_utf_to_local; /* ! * local code to UTF8 conversion map */ typedef struct { unsigned int code; /* local code */ ! unsigned int utf; /* UTF8 */ } pg_local_to_utf; extern int pg_mb2wchar(const unsigned char *from, pg_wchar *to); Index: src/test/mb/mbregress.sh =================================================================== RCS file: /cvsroot/pgsql/src/test/mb/mbregress.sh,v retrieving revision 1.7 diff -c -c -r1.7 mbregress.sh *** src/test/mb/mbregress.sh 29 Nov 2003 19:52:14 -0000 1.7 --- src/test/mb/mbregress.sh 3 Mar 2005 05:11:53 -0000 *************** *** 15,24 **** fi dropdb unitest ! createdb -E UNICODE unitest PSQL="psql -n -e -q" ! tests="euc_jp sjis euc_kr euc_cn euc_tw big5 unicode mule_internal" unset PGCLIENTENCODING for i in $tests do --- 15,24 ---- fi dropdb unitest ! createdb -E UTF8 unitest PSQL="psql -n -e -q" ! tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal" unset PGCLIENTENCODING for i in $tests do Index: src/test/regress/expected/conversion.out =================================================================== RCS file: /cvsroot/pgsql/src/test/regress/expected/conversion.out,v retrieving revision 1.9 diff -c -c -r1.9 conversion.out *** src/test/regress/expected/conversion.out 21 Nov 2003 22:32:49 -0000 1.9 --- src/test/regress/expected/conversion.out 3 Mar 2005 05:11:54 -0000 *************** *** 3,23 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; ERROR: conversion "myconv" already exists -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; ! ERROR: default conversion for LATIN1 to UNICODE already exists -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; ERROR: conversion "myconv_bad" does not exist --- 3,23 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; ERROR: conversion "myconv" already exists -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; ! ERROR: default conversion for LATIN1 to UTF8 already exists -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; ERROR: conversion "myconv_bad" does not exist *************** *** 134,160 **** foo (1 row) ! -- ALT --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL'); convert --------- foo (1 row) ! -- MULE_INTERNAL --> ALT SELECT CONVERT('foo' USING mic_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT'); convert --------- foo --- 134,160 ---- foo (1 row) ! -- WIN866 --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'MULE_INTERNAL'); convert --------- foo (1 row) ! -- MULE_INTERNAL --> WIN866 SELECT CONVERT('foo' USING mic_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN866'); convert --------- foo *************** *** 186,238 **** foo (1 row) ! -- KOI8R --> ALT SELECT CONVERT('foo' USING koi8_r_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'ALT'); convert --------- foo (1 row) ! -- ALT --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'KOI8R'); convert --------- foo (1 row) ! -- ALT --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> ALT SELECT CONVERT('foo' USING windows_1251_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'ALT'); convert --------- foo --- 186,238 ---- foo (1 row) ! -- KOI8R --> WIN866 SELECT CONVERT('foo' USING koi8_r_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'KOI8R'); convert --------- foo (1 row) ! -- WIN866 --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> WIN866 SELECT CONVERT('foo' USING windows_1251_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'WIN866'); convert --------- foo *************** *** 290,316 **** foo (1 row) ! -- ISO-8859-5 --> ALT SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'ALT'); convert --------- foo (1 row) ! -- ALT --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'ISO-8859-5'); convert --------- foo --- 290,316 ---- foo (1 row) ! -- ISO-8859-5 --> WIN866 SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'ISO-8859-5'); convert --------- foo *************** *** 680,1512 **** foo (1 row) ! -- SQL_ASCII --> UNICODE ! SELECT CONVERT('foo' USING ascii_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SQL_ASCII', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> SQL_ASCII ! SELECT CONVERT('foo' USING utf_8_to_ascii); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'SQL_ASCII'); convert --------- foo (1 row) ! -- BIG5 --> UNICODE ! SELECT CONVERT('foo' USING big5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'BIG5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> BIG5 ! SELECT CONVERT('foo' USING utf_8_to_big5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'BIG5'); convert --------- foo (1 row) ! -- UNICODE --> KOI8R ! SELECT CONVERT('foo' USING utf_8_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'KOI8R'); convert --------- foo (1 row) ! -- KOI8R --> UNICODE ! SELECT CONVERT('foo' USING koi8_r_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN1251 ! SELECT CONVERT('foo' USING utf_8_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> UNICODE ! SELECT CONVERT('foo' USING windows_1251_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ALT ! SELECT CONVERT('foo' USING utf_8_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ALT'); convert --------- foo (1 row) ! -- ALT --> UNICODE ! SELECT CONVERT('foo' USING windows_866_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ALT', 'UNICODE'); convert --------- foo (1 row) ! -- EUC_CN --> UNICODE ! SELECT CONVERT('foo' USING euc_cn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_CN', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_CN ! SELECT CONVERT('foo' USING utf_8_to_euc_cn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_CN'); convert --------- foo (1 row) ! -- EUC_JP --> UNICODE ! SELECT CONVERT('foo' USING euc_jp_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_JP', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_JP ! SELECT CONVERT('foo' USING utf_8_to_euc_jp); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_JP'); convert --------- foo (1 row) ! -- EUC_KR --> UNICODE ! SELECT CONVERT('foo' USING euc_kr_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_KR', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_KR ! SELECT CONVERT('foo' USING utf_8_to_euc_kr); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_KR'); convert --------- foo (1 row) ! -- EUC_TW --> UNICODE ! SELECT CONVERT('foo' USING euc_tw_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_TW', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> EUC_TW ! SELECT CONVERT('foo' USING utf_8_to_euc_tw); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'EUC_TW'); convert --------- foo (1 row) ! -- GB18030 --> UNICODE ! SELECT CONVERT('foo' USING gb18030_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GB18030', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> GB18030 ! SELECT CONVERT('foo' USING utf_8_to_gb18030); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'GB18030'); convert --------- foo (1 row) ! -- GBK --> UNICODE ! SELECT CONVERT('foo' USING gbk_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GBK', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> GBK ! SELECT CONVERT('foo' USING utf_8_to_gbk); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'GBK'); convert --------- foo (1 row) ! -- UNICODE --> LATIN2 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN2'); convert --------- foo (1 row) ! -- LATIN2 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN2', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN3 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN3'); convert --------- foo (1 row) ! -- LATIN3 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN3', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN4 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN4'); convert --------- foo (1 row) ! -- LATIN4 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN4', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN5 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN5'); convert --------- foo (1 row) ! -- LATIN5 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN6 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN6'); convert --------- foo (1 row) ! -- LATIN6 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN6', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN7 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN7'); convert --------- foo (1 row) ! -- LATIN7 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN7', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN8 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN8'); convert --------- foo (1 row) ! -- LATIN8 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN8', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN9 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN9'); convert --------- foo (1 row) ! -- LATIN9 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN9', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN10 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN10'); convert --------- foo (1 row) ! -- LATIN10 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN10', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-5 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-5'); convert --------- foo (1 row) ! -- ISO-8859-5 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-6 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-6'); convert --------- foo (1 row) ! -- ISO-8859-6 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-6', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-7 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-7'); convert --------- foo (1 row) ! -- ISO-8859-7 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-7', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> ISO-8859-8 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-8'); convert --------- foo (1 row) ! -- ISO-8859-8 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-8', 'UNICODE'); convert --------- foo (1 row) ! -- LATIN1 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN1', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> LATIN1 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'LATIN1'); convert --------- foo (1 row) ! -- JOHAB --> UNICODE ! SELECT CONVERT('foo' USING johab_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'JOHAB', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> JOHAB ! SELECT CONVERT('foo' USING utf_8_to_johab); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'JOHAB'); convert --------- foo (1 row) ! -- SJIS --> UNICODE ! SELECT CONVERT('foo' USING sjis_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SJIS', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> SJIS ! SELECT CONVERT('foo' USING utf_8_to_sjis); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'SJIS'); convert --------- foo (1 row) ! -- TCVN --> UNICODE ! SELECT CONVERT('foo' USING tcvn_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'TCVN', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> TCVN ! SELECT CONVERT('foo' USING utf_8_to_tcvn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'TCVN'); convert --------- foo (1 row) ! -- UHC --> UNICODE ! SELECT CONVERT('foo' USING uhc_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UHC', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> UHC ! SELECT CONVERT('foo' USING utf_8_to_uhc); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'UHC'); convert --------- foo (1 row) ! -- UNICODE --> WIN1250 ! SELECT CONVERT('foo' USING utf_8_to_windows_1250); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1250'); convert --------- foo (1 row) ! -- WIN1250 --> UNICODE ! SELECT CONVERT('foo' USING windows_1250_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1250', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN1256 ! SELECT CONVERT('foo' USING utf_8_to_windows_1256); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN1256'); convert --------- foo (1 row) ! -- WIN1256 --> UNICODE ! SELECT CONVERT('foo' USING windows_1256_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1256', 'UNICODE'); convert --------- foo (1 row) ! -- UNICODE --> WIN874 ! SELECT CONVERT('foo' USING utf_8_to_windows_874); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UNICODE', 'WIN874'); convert --------- foo (1 row) ! -- WIN874 --> UNICODE ! SELECT CONVERT('foo' USING windows_874_to_utf_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN874', 'UNICODE'); convert --------- foo --- 680,1512 ---- foo (1 row) ! -- SQL_ASCII --> UTF8 ! SELECT CONVERT('foo' USING ascii_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SQL_ASCII', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> SQL_ASCII ! SELECT CONVERT('foo' USING utf8_to_ascii); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'SQL_ASCII'); convert --------- foo (1 row) ! -- BIG5 --> UTF8 ! SELECT CONVERT('foo' USING big5_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'BIG5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> BIG5 ! SELECT CONVERT('foo' USING utf8_to_big5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'BIG5'); convert --------- foo (1 row) ! -- UTF8 --> KOI8R ! SELECT CONVERT('foo' USING utf8_to_koi8_r); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'KOI8R'); convert --------- foo (1 row) ! -- KOI8R --> UTF8 ! SELECT CONVERT('foo' USING koi8_r_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'KOI8R', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1251 ! SELECT CONVERT('foo' USING utf8_to_windows_1251); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1251'); convert --------- foo (1 row) ! -- WIN1251 --> UTF8 ! SELECT CONVERT('foo' USING windows_1251_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1251', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN866 ! SELECT CONVERT('foo' USING utf8_to_windows_866); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN866'); convert --------- foo (1 row) ! -- WIN866 --> UTF8 ! SELECT CONVERT('foo' USING windows_866_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN866', 'UTF8'); convert --------- foo (1 row) ! -- EUC_CN --> UTF8 ! SELECT CONVERT('foo' USING euc_cn_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_CN', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_CN ! SELECT CONVERT('foo' USING utf8_to_euc_cn); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_CN'); convert --------- foo (1 row) ! -- EUC_JP --> UTF8 ! SELECT CONVERT('foo' USING euc_jp_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_JP', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_JP ! SELECT CONVERT('foo' USING utf8_to_euc_jp); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_JP'); convert --------- foo (1 row) ! -- EUC_KR --> UTF8 ! SELECT CONVERT('foo' USING euc_kr_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_KR', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_KR ! SELECT CONVERT('foo' USING utf8_to_euc_kr); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_KR'); convert --------- foo (1 row) ! -- EUC_TW --> UTF8 ! SELECT CONVERT('foo' USING euc_tw_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'EUC_TW', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> EUC_TW ! SELECT CONVERT('foo' USING utf8_to_euc_tw); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'EUC_TW'); convert --------- foo (1 row) ! -- GB18030 --> UTF8 ! SELECT CONVERT('foo' USING gb18030_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GB18030', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> GB18030 ! SELECT CONVERT('foo' USING utf8_to_gb18030); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'GB18030'); convert --------- foo (1 row) ! -- GBK --> UTF8 ! SELECT CONVERT('foo' USING gbk_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'GBK', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> GBK ! SELECT CONVERT('foo' USING utf8_to_gbk); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'GBK'); convert --------- foo (1 row) ! -- UTF8 --> LATIN2 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_2); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN2'); convert --------- foo (1 row) ! -- LATIN2 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_2_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN2', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN3 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_3); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN3'); convert --------- foo (1 row) ! -- LATIN3 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_3_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN3', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN4 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_4); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN4'); convert --------- foo (1 row) ! -- LATIN4 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_4_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN4', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN5 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_9); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN5'); convert --------- foo (1 row) ! -- LATIN5 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_9_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN6 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_10); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN6'); convert --------- foo (1 row) ! -- LATIN6 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_10_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN6', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN7 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_13); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN7'); convert --------- foo (1 row) ! -- LATIN7 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_13_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN7', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN8 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_14); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN8'); convert --------- foo (1 row) ! -- LATIN8 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_14_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN8', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN9 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_15); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN9'); convert --------- foo (1 row) ! -- LATIN9 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_15_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN9', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN10 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_16); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN10'); convert --------- foo (1 row) ! -- LATIN10 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_16_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN10', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-5 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_5); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-5'); convert --------- foo (1 row) ! -- ISO-8859-5 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_5_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-5', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-6 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_6); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-6'); convert --------- foo (1 row) ! -- ISO-8859-6 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_6_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-6', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-7 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_7); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-7'); convert --------- foo (1 row) ! -- ISO-8859-7 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_7_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-7', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> ISO-8859-8 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-8'); convert --------- foo (1 row) ! -- ISO-8859-8 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_8_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'ISO-8859-8', 'UTF8'); convert --------- foo (1 row) ! -- LATIN1 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_1_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'LATIN1', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> LATIN1 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_1); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'LATIN1'); convert --------- foo (1 row) ! -- JOHAB --> UTF8 ! SELECT CONVERT('foo' USING johab_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'JOHAB', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> JOHAB ! SELECT CONVERT('foo' USING utf8_to_johab); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'JOHAB'); convert --------- foo (1 row) ! -- SJIS --> UTF8 ! SELECT CONVERT('foo' USING sjis_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'SJIS', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> SJIS ! SELECT CONVERT('foo' USING utf8_to_sjis); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'SJIS'); convert --------- foo (1 row) ! -- WIN1258 --> UTF8 ! SELECT CONVERT('foo' USING win1258_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1258', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1258 ! SELECT CONVERT('foo' USING utf8_to_win1258); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1258'); convert --------- foo (1 row) ! -- UHC --> UTF8 ! SELECT CONVERT('foo' USING uhc_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UHC', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> UHC ! SELECT CONVERT('foo' USING utf8_to_uhc); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'UHC'); convert --------- foo (1 row) ! -- UTF8 --> WIN1250 ! SELECT CONVERT('foo' USING utf8_to_windows_1250); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1250'); convert --------- foo (1 row) ! -- WIN1250 --> UTF8 ! SELECT CONVERT('foo' USING windows_1250_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1250', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN1256 ! SELECT CONVERT('foo' USING utf8_to_windows_1256); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN1256'); convert --------- foo (1 row) ! -- WIN1256 --> UTF8 ! SELECT CONVERT('foo' USING windows_1256_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN1256', 'UTF8'); convert --------- foo (1 row) ! -- UTF8 --> WIN874 ! SELECT CONVERT('foo' USING utf8_to_windows_874); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'UTF8', 'WIN874'); convert --------- foo (1 row) ! -- WIN874 --> UTF8 ! SELECT CONVERT('foo' USING windows_874_to_utf8); convert_using --------------- foo (1 row) ! SELECT CONVERT('foo', 'WIN874', 'UTF8'); convert --------- foo Index: src/test/regress/sql/conversion.sql =================================================================== RCS file: /cvsroot/pgsql/src/test/regress/sql/conversion.sql,v retrieving revision 1.6 diff -c -c -r1.6 conversion.sql *** src/test/regress/sql/conversion.sql 21 Nov 2003 22:32:49 -0000 1.6 --- src/test/regress/sql/conversion.sql 3 Mar 2005 05:11:54 -0000 *************** *** 3,21 **** -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UNICODE' FROM iso8859_1_to_utf8; -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; COMMENT ON CONVERSION myconv IS 'bar'; --- 3,21 ---- -- CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER; SET SESSION AUTHORIZATION conversion_test_user; ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make same name conversion in same schema -- ! CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- create default conversion with qualified name -- ! CREATE DEFAULT CONVERSION public.mydef FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- -- cannot make default conversion with same shcema/for_encoding/to_encoding -- ! CREATE DEFAULT CONVERSION public.mydef2 FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8; -- test comments COMMENT ON CONVERSION myconv_bad IS 'foo'; COMMENT ON CONVERSION myconv IS 'bar'; *************** *** 51,80 **** -- MULE_INTERNAL --> WIN1251 SELECT CONVERT('foo' USING mic_to_windows_1251); SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251'); ! -- ALT --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); ! SELECT CONVERT('foo', 'ALT', 'MULE_INTERNAL'); ! -- MULE_INTERNAL --> ALT SELECT CONVERT('foo' USING mic_to_windows_866); ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'ALT'); -- KOI8R --> WIN1251 SELECT CONVERT('foo' USING koi8_r_to_windows_1251); SELECT CONVERT('foo', 'KOI8R', 'WIN1251'); -- WIN1251 --> KOI8R SELECT CONVERT('foo' USING windows_1251_to_koi8_r); SELECT CONVERT('foo', 'WIN1251', 'KOI8R'); ! -- KOI8R --> ALT SELECT CONVERT('foo' USING koi8_r_to_windows_866); ! SELECT CONVERT('foo', 'KOI8R', 'ALT'); ! -- ALT --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); ! SELECT CONVERT('foo', 'ALT', 'KOI8R'); ! -- ALT --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); ! SELECT CONVERT('foo', 'ALT', 'WIN1251'); ! -- WIN1251 --> ALT SELECT CONVERT('foo' USING windows_1251_to_windows_866); ! SELECT CONVERT('foo', 'WIN1251', 'ALT'); -- ISO-8859-5 --> KOI8R SELECT CONVERT('foo' USING iso_8859_5_to_koi8_r); SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R'); --- 51,80 ---- -- MULE_INTERNAL --> WIN1251 SELECT CONVERT('foo' USING mic_to_windows_1251); SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN1251'); ! -- WIN866 --> MULE_INTERNAL SELECT CONVERT('foo' USING windows_866_to_mic); ! SELECT CONVERT('foo', 'WIN866', 'MULE_INTERNAL'); ! -- MULE_INTERNAL --> WIN866 SELECT CONVERT('foo' USING mic_to_windows_866); ! SELECT CONVERT('foo', 'MULE_INTERNAL', 'WIN866'); -- KOI8R --> WIN1251 SELECT CONVERT('foo' USING koi8_r_to_windows_1251); SELECT CONVERT('foo', 'KOI8R', 'WIN1251'); -- WIN1251 --> KOI8R SELECT CONVERT('foo' USING windows_1251_to_koi8_r); SELECT CONVERT('foo', 'WIN1251', 'KOI8R'); ! -- KOI8R --> WIN866 SELECT CONVERT('foo' USING koi8_r_to_windows_866); ! SELECT CONVERT('foo', 'KOI8R', 'WIN866'); ! -- WIN866 --> KOI8R SELECT CONVERT('foo' USING windows_866_to_koi8_r); ! SELECT CONVERT('foo', 'WIN866', 'KOI8R'); ! -- WIN866 --> WIN1251 SELECT CONVERT('foo' USING windows_866_to_windows_1251); ! SELECT CONVERT('foo', 'WIN866', 'WIN1251'); ! -- WIN1251 --> WIN866 SELECT CONVERT('foo' USING windows_1251_to_windows_866); ! SELECT CONVERT('foo', 'WIN1251', 'WIN866'); -- ISO-8859-5 --> KOI8R SELECT CONVERT('foo' USING iso_8859_5_to_koi8_r); SELECT CONVERT('foo', 'ISO-8859-5', 'KOI8R'); *************** *** 87,98 **** -- WIN1251 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_1251_to_iso_8859_5); SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5'); ! -- ISO-8859-5 --> ALT SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); ! SELECT CONVERT('foo', 'ISO-8859-5', 'ALT'); ! -- ALT --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); ! SELECT CONVERT('foo', 'ALT', 'ISO-8859-5'); -- EUC_CN --> MULE_INTERNAL SELECT CONVERT('foo' USING euc_cn_to_mic); SELECT CONVERT('foo', 'EUC_CN', 'MULE_INTERNAL'); --- 87,98 ---- -- WIN1251 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_1251_to_iso_8859_5); SELECT CONVERT('foo', 'WIN1251', 'ISO-8859-5'); ! -- ISO-8859-5 --> WIN866 SELECT CONVERT('foo' USING iso_8859_5_to_windows_866); ! SELECT CONVERT('foo', 'ISO-8859-5', 'WIN866'); ! -- WIN866 --> ISO-8859-5 SELECT CONVERT('foo' USING windows_866_to_iso_8859_5); ! SELECT CONVERT('foo', 'WIN866', 'ISO-8859-5'); -- EUC_CN --> MULE_INTERNAL SELECT CONVERT('foo' USING euc_cn_to_mic); SELECT CONVERT('foo', 'EUC_CN', 'MULE_INTERNAL'); *************** *** 177,374 **** -- MULE_INTERNAL --> LATIN4 SELECT CONVERT('foo' USING mic_to_iso_8859_4); SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN4'); ! -- SQL_ASCII --> UNICODE ! SELECT CONVERT('foo' USING ascii_to_utf_8); ! SELECT CONVERT('foo', 'SQL_ASCII', 'UNICODE'); ! -- UNICODE --> SQL_ASCII ! SELECT CONVERT('foo' USING utf_8_to_ascii); ! SELECT CONVERT('foo', 'UNICODE', 'SQL_ASCII'); ! -- BIG5 --> UNICODE ! SELECT CONVERT('foo' USING big5_to_utf_8); ! SELECT CONVERT('foo', 'BIG5', 'UNICODE'); ! -- UNICODE --> BIG5 ! SELECT CONVERT('foo' USING utf_8_to_big5); ! SELECT CONVERT('foo', 'UNICODE', 'BIG5'); ! -- UNICODE --> KOI8R ! SELECT CONVERT('foo' USING utf_8_to_koi8_r); ! SELECT CONVERT('foo', 'UNICODE', 'KOI8R'); ! -- KOI8R --> UNICODE ! SELECT CONVERT('foo' USING koi8_r_to_utf_8); ! SELECT CONVERT('foo', 'KOI8R', 'UNICODE'); ! -- UNICODE --> WIN1251 ! SELECT CONVERT('foo' USING utf_8_to_windows_1251); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1251'); ! -- WIN1251 --> UNICODE ! SELECT CONVERT('foo' USING windows_1251_to_utf_8); ! SELECT CONVERT('foo', 'WIN1251', 'UNICODE'); ! -- UNICODE --> ALT ! SELECT CONVERT('foo' USING utf_8_to_windows_866); ! SELECT CONVERT('foo', 'UNICODE', 'ALT'); ! -- ALT --> UNICODE ! SELECT CONVERT('foo' USING windows_866_to_utf_8); ! SELECT CONVERT('foo', 'ALT', 'UNICODE'); ! -- EUC_CN --> UNICODE ! SELECT CONVERT('foo' USING euc_cn_to_utf_8); ! SELECT CONVERT('foo', 'EUC_CN', 'UNICODE'); ! -- UNICODE --> EUC_CN ! SELECT CONVERT('foo' USING utf_8_to_euc_cn); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_CN'); ! -- EUC_JP --> UNICODE ! SELECT CONVERT('foo' USING euc_jp_to_utf_8); ! SELECT CONVERT('foo', 'EUC_JP', 'UNICODE'); ! -- UNICODE --> EUC_JP ! SELECT CONVERT('foo' USING utf_8_to_euc_jp); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_JP'); ! -- EUC_KR --> UNICODE ! SELECT CONVERT('foo' USING euc_kr_to_utf_8); ! SELECT CONVERT('foo', 'EUC_KR', 'UNICODE'); ! -- UNICODE --> EUC_KR ! SELECT CONVERT('foo' USING utf_8_to_euc_kr); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_KR'); ! -- EUC_TW --> UNICODE ! SELECT CONVERT('foo' USING euc_tw_to_utf_8); ! SELECT CONVERT('foo', 'EUC_TW', 'UNICODE'); ! -- UNICODE --> EUC_TW ! SELECT CONVERT('foo' USING utf_8_to_euc_tw); ! SELECT CONVERT('foo', 'UNICODE', 'EUC_TW'); ! -- GB18030 --> UNICODE ! SELECT CONVERT('foo' USING gb18030_to_utf_8); ! SELECT CONVERT('foo', 'GB18030', 'UNICODE'); ! -- UNICODE --> GB18030 ! SELECT CONVERT('foo' USING utf_8_to_gb18030); ! SELECT CONVERT('foo', 'UNICODE', 'GB18030'); ! -- GBK --> UNICODE ! SELECT CONVERT('foo' USING gbk_to_utf_8); ! SELECT CONVERT('foo', 'GBK', 'UNICODE'); ! -- UNICODE --> GBK ! SELECT CONVERT('foo' USING utf_8_to_gbk); ! SELECT CONVERT('foo', 'UNICODE', 'GBK'); ! -- UNICODE --> LATIN2 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_2); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN2'); ! -- LATIN2 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_2_to_utf_8); ! SELECT CONVERT('foo', 'LATIN2', 'UNICODE'); ! -- UNICODE --> LATIN3 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_3); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN3'); ! -- LATIN3 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_3_to_utf_8); ! SELECT CONVERT('foo', 'LATIN3', 'UNICODE'); ! -- UNICODE --> LATIN4 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_4); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN4'); ! -- LATIN4 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_4_to_utf_8); ! SELECT CONVERT('foo', 'LATIN4', 'UNICODE'); ! -- UNICODE --> LATIN5 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_9); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN5'); ! -- LATIN5 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_9_to_utf_8); ! SELECT CONVERT('foo', 'LATIN5', 'UNICODE'); ! -- UNICODE --> LATIN6 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_10); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN6'); ! -- LATIN6 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_10_to_utf_8); ! SELECT CONVERT('foo', 'LATIN6', 'UNICODE'); ! -- UNICODE --> LATIN7 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_13); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN7'); ! -- LATIN7 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_13_to_utf_8); ! SELECT CONVERT('foo', 'LATIN7', 'UNICODE'); ! -- UNICODE --> LATIN8 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_14); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN8'); ! -- LATIN8 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_14_to_utf_8); ! SELECT CONVERT('foo', 'LATIN8', 'UNICODE'); ! -- UNICODE --> LATIN9 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_15); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN9'); ! -- LATIN9 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_15_to_utf_8); ! SELECT CONVERT('foo', 'LATIN9', 'UNICODE'); ! -- UNICODE --> LATIN10 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_16); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN10'); ! -- LATIN10 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_16_to_utf_8); ! SELECT CONVERT('foo', 'LATIN10', 'UNICODE'); ! -- UNICODE --> ISO-8859-5 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_5); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-5'); ! -- ISO-8859-5 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_5_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-5', 'UNICODE'); ! -- UNICODE --> ISO-8859-6 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_6); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-6'); ! -- ISO-8859-6 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_6_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-6', 'UNICODE'); ! -- UNICODE --> ISO-8859-7 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_7); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-7'); ! -- ISO-8859-7 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_7_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-7', 'UNICODE'); ! -- UNICODE --> ISO-8859-8 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_8); ! SELECT CONVERT('foo', 'UNICODE', 'ISO-8859-8'); ! -- ISO-8859-8 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_8_to_utf_8); ! SELECT CONVERT('foo', 'ISO-8859-8', 'UNICODE'); ! -- LATIN1 --> UNICODE ! SELECT CONVERT('foo' USING iso_8859_1_to_utf_8); ! SELECT CONVERT('foo', 'LATIN1', 'UNICODE'); ! -- UNICODE --> LATIN1 ! SELECT CONVERT('foo' USING utf_8_to_iso_8859_1); ! SELECT CONVERT('foo', 'UNICODE', 'LATIN1'); ! -- JOHAB --> UNICODE ! SELECT CONVERT('foo' USING johab_to_utf_8); ! SELECT CONVERT('foo', 'JOHAB', 'UNICODE'); ! -- UNICODE --> JOHAB ! SELECT CONVERT('foo' USING utf_8_to_johab); ! SELECT CONVERT('foo', 'UNICODE', 'JOHAB'); ! -- SJIS --> UNICODE ! SELECT CONVERT('foo' USING sjis_to_utf_8); ! SELECT CONVERT('foo', 'SJIS', 'UNICODE'); ! -- UNICODE --> SJIS ! SELECT CONVERT('foo' USING utf_8_to_sjis); ! SELECT CONVERT('foo', 'UNICODE', 'SJIS'); ! -- TCVN --> UNICODE ! SELECT CONVERT('foo' USING tcvn_to_utf_8); ! SELECT CONVERT('foo', 'TCVN', 'UNICODE'); ! -- UNICODE --> TCVN ! SELECT CONVERT('foo' USING utf_8_to_tcvn); ! SELECT CONVERT('foo', 'UNICODE', 'TCVN'); ! -- UHC --> UNICODE ! SELECT CONVERT('foo' USING uhc_to_utf_8); ! SELECT CONVERT('foo', 'UHC', 'UNICODE'); ! -- UNICODE --> UHC ! SELECT CONVERT('foo' USING utf_8_to_uhc); ! SELECT CONVERT('foo', 'UNICODE', 'UHC'); ! -- UNICODE --> WIN1250 ! SELECT CONVERT('foo' USING utf_8_to_windows_1250); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1250'); ! -- WIN1250 --> UNICODE ! SELECT CONVERT('foo' USING windows_1250_to_utf_8); ! SELECT CONVERT('foo', 'WIN1250', 'UNICODE'); ! -- UNICODE --> WIN1256 ! SELECT CONVERT('foo' USING utf_8_to_windows_1256); ! SELECT CONVERT('foo', 'UNICODE', 'WIN1256'); ! -- WIN1256 --> UNICODE ! SELECT CONVERT('foo' USING windows_1256_to_utf_8); ! SELECT CONVERT('foo', 'WIN1256', 'UNICODE'); ! -- UNICODE --> WIN874 ! SELECT CONVERT('foo' USING utf_8_to_windows_874); ! SELECT CONVERT('foo', 'UNICODE', 'WIN874'); ! -- WIN874 --> UNICODE ! SELECT CONVERT('foo' USING windows_874_to_utf_8); ! SELECT CONVERT('foo', 'WIN874', 'UNICODE'); -- -- return to the super user -- --- 177,374 ---- -- MULE_INTERNAL --> LATIN4 SELECT CONVERT('foo' USING mic_to_iso_8859_4); SELECT CONVERT('foo', 'MULE_INTERNAL', 'LATIN4'); ! -- SQL_ASCII --> UTF8 ! SELECT CONVERT('foo' USING ascii_to_utf8); ! SELECT CONVERT('foo', 'SQL_ASCII', 'UTF8'); ! -- UTF8 --> SQL_ASCII ! SELECT CONVERT('foo' USING utf8_to_ascii); ! SELECT CONVERT('foo', 'UTF8', 'SQL_ASCII'); ! -- BIG5 --> UTF8 ! SELECT CONVERT('foo' USING big5_to_utf8); ! SELECT CONVERT('foo', 'BIG5', 'UTF8'); ! -- UTF8 --> BIG5 ! SELECT CONVERT('foo' USING utf8_to_big5); ! SELECT CONVERT('foo', 'UTF8', 'BIG5'); ! -- UTF8 --> KOI8R ! SELECT CONVERT('foo' USING utf8_to_koi8_r); ! SELECT CONVERT('foo', 'UTF8', 'KOI8R'); ! -- KOI8R --> UTF8 ! SELECT CONVERT('foo' USING koi8_r_to_utf8); ! SELECT CONVERT('foo', 'KOI8R', 'UTF8'); ! -- UTF8 --> WIN1251 ! SELECT CONVERT('foo' USING utf8_to_windows_1251); ! SELECT CONVERT('foo', 'UTF8', 'WIN1251'); ! -- WIN1251 --> UTF8 ! SELECT CONVERT('foo' USING windows_1251_to_utf8); ! SELECT CONVERT('foo', 'WIN1251', 'UTF8'); ! -- UTF8 --> WIN866 ! SELECT CONVERT('foo' USING utf8_to_windows_866); ! SELECT CONVERT('foo', 'UTF8', 'WIN866'); ! -- WIN866 --> UTF8 ! SELECT CONVERT('foo' USING windows_866_to_utf8); ! SELECT CONVERT('foo', 'WIN866', 'UTF8'); ! -- EUC_CN --> UTF8 ! SELECT CONVERT('foo' USING euc_cn_to_utf8); ! SELECT CONVERT('foo', 'EUC_CN', 'UTF8'); ! -- UTF8 --> EUC_CN ! SELECT CONVERT('foo' USING utf8_to_euc_cn); ! SELECT CONVERT('foo', 'UTF8', 'EUC_CN'); ! -- EUC_JP --> UTF8 ! SELECT CONVERT('foo' USING euc_jp_to_utf8); ! SELECT CONVERT('foo', 'EUC_JP', 'UTF8'); ! -- UTF8 --> EUC_JP ! SELECT CONVERT('foo' USING utf8_to_euc_jp); ! SELECT CONVERT('foo', 'UTF8', 'EUC_JP'); ! -- EUC_KR --> UTF8 ! SELECT CONVERT('foo' USING euc_kr_to_utf8); ! SELECT CONVERT('foo', 'EUC_KR', 'UTF8'); ! -- UTF8 --> EUC_KR ! SELECT CONVERT('foo' USING utf8_to_euc_kr); ! SELECT CONVERT('foo', 'UTF8', 'EUC_KR'); ! -- EUC_TW --> UTF8 ! SELECT CONVERT('foo' USING euc_tw_to_utf8); ! SELECT CONVERT('foo', 'EUC_TW', 'UTF8'); ! -- UTF8 --> EUC_TW ! SELECT CONVERT('foo' USING utf8_to_euc_tw); ! SELECT CONVERT('foo', 'UTF8', 'EUC_TW'); ! -- GB18030 --> UTF8 ! SELECT CONVERT('foo' USING gb18030_to_utf8); ! SELECT CONVERT('foo', 'GB18030', 'UTF8'); ! -- UTF8 --> GB18030 ! SELECT CONVERT('foo' USING utf8_to_gb18030); ! SELECT CONVERT('foo', 'UTF8', 'GB18030'); ! -- GBK --> UTF8 ! SELECT CONVERT('foo' USING gbk_to_utf8); ! SELECT CONVERT('foo', 'GBK', 'UTF8'); ! -- UTF8 --> GBK ! SELECT CONVERT('foo' USING utf8_to_gbk); ! SELECT CONVERT('foo', 'UTF8', 'GBK'); ! -- UTF8 --> LATIN2 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_2); ! SELECT CONVERT('foo', 'UTF8', 'LATIN2'); ! -- LATIN2 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_2_to_utf8); ! SELECT CONVERT('foo', 'LATIN2', 'UTF8'); ! -- UTF8 --> LATIN3 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_3); ! SELECT CONVERT('foo', 'UTF8', 'LATIN3'); ! -- LATIN3 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_3_to_utf8); ! SELECT CONVERT('foo', 'LATIN3', 'UTF8'); ! -- UTF8 --> LATIN4 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_4); ! SELECT CONVERT('foo', 'UTF8', 'LATIN4'); ! -- LATIN4 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_4_to_utf8); ! SELECT CONVERT('foo', 'LATIN4', 'UTF8'); ! -- UTF8 --> LATIN5 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_9); ! SELECT CONVERT('foo', 'UTF8', 'LATIN5'); ! -- LATIN5 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_9_to_utf8); ! SELECT CONVERT('foo', 'LATIN5', 'UTF8'); ! -- UTF8 --> LATIN6 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_10); ! SELECT CONVERT('foo', 'UTF8', 'LATIN6'); ! -- LATIN6 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_10_to_utf8); ! SELECT CONVERT('foo', 'LATIN6', 'UTF8'); ! -- UTF8 --> LATIN7 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_13); ! SELECT CONVERT('foo', 'UTF8', 'LATIN7'); ! -- LATIN7 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_13_to_utf8); ! SELECT CONVERT('foo', 'LATIN7', 'UTF8'); ! -- UTF8 --> LATIN8 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_14); ! SELECT CONVERT('foo', 'UTF8', 'LATIN8'); ! -- LATIN8 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_14_to_utf8); ! SELECT CONVERT('foo', 'LATIN8', 'UTF8'); ! -- UTF8 --> LATIN9 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_15); ! SELECT CONVERT('foo', 'UTF8', 'LATIN9'); ! -- LATIN9 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_15_to_utf8); ! SELECT CONVERT('foo', 'LATIN9', 'UTF8'); ! -- UTF8 --> LATIN10 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_16); ! SELECT CONVERT('foo', 'UTF8', 'LATIN10'); ! -- LATIN10 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_16_to_utf8); ! SELECT CONVERT('foo', 'LATIN10', 'UTF8'); ! -- UTF8 --> ISO-8859-5 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_5); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-5'); ! -- ISO-8859-5 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_5_to_utf8); ! SELECT CONVERT('foo', 'ISO-8859-5', 'UTF8'); ! -- UTF8 --> ISO-8859-6 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_6); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-6'); ! -- ISO-8859-6 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_6_to_utf8); ! SELECT CONVERT('foo', 'ISO-8859-6', 'UTF8'); ! -- UTF8 --> ISO-8859-7 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_7); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-7'); ! -- ISO-8859-7 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_7_to_utf8); ! SELECT CONVERT('foo', 'ISO-8859-7', 'UTF8'); ! -- UTF8 --> ISO-8859-8 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_8); ! SELECT CONVERT('foo', 'UTF8', 'ISO-8859-8'); ! -- ISO-8859-8 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_8_to_utf8); ! SELECT CONVERT('foo', 'ISO-8859-8', 'UTF8'); ! -- LATIN1 --> UTF8 ! SELECT CONVERT('foo' USING iso_8859_1_to_utf8); ! SELECT CONVERT('foo', 'LATIN1', 'UTF8'); ! -- UTF8 --> LATIN1 ! SELECT CONVERT('foo' USING utf8_to_iso_8859_1); ! SELECT CONVERT('foo', 'UTF8', 'LATIN1'); ! -- JOHAB --> UTF8 ! SELECT CONVERT('foo' USING johab_to_utf8); ! SELECT CONVERT('foo', 'JOHAB', 'UTF8'); ! -- UTF8 --> JOHAB ! SELECT CONVERT('foo' USING utf8_to_johab); ! SELECT CONVERT('foo', 'UTF8', 'JOHAB'); ! -- SJIS --> UTF8 ! SELECT CONVERT('foo' USING sjis_to_utf8); ! SELECT CONVERT('foo', 'SJIS', 'UTF8'); ! -- UTF8 --> SJIS ! SELECT CONVERT('foo' USING utf8_to_sjis); ! SELECT CONVERT('foo', 'UTF8', 'SJIS'); ! -- WIN1258 --> UTF8 ! SELECT CONVERT('foo' USING win1258_to_utf8); ! SELECT CONVERT('foo', 'WIN1258', 'UTF8'); ! -- UTF8 --> WIN1258 ! SELECT CONVERT('foo' USING utf8_to_win1258); ! SELECT CONVERT('foo', 'UTF8', 'WIN1258'); ! -- UHC --> UTF8 ! SELECT CONVERT('foo' USING uhc_to_utf8); ! SELECT CONVERT('foo', 'UHC', 'UTF8'); ! -- UTF8 --> UHC ! SELECT CONVERT('foo' USING utf8_to_uhc); ! SELECT CONVERT('foo', 'UTF8', 'UHC'); ! -- UTF8 --> WIN1250 ! SELECT CONVERT('foo' USING utf8_to_windows_1250); ! SELECT CONVERT('foo', 'UTF8', 'WIN1250'); ! -- WIN1250 --> UTF8 ! SELECT CONVERT('foo' USING windows_1250_to_utf8); ! SELECT CONVERT('foo', 'WIN1250', 'UTF8'); ! -- UTF8 --> WIN1256 ! SELECT CONVERT('foo' USING utf8_to_windows_1256); ! SELECT CONVERT('foo', 'UTF8', 'WIN1256'); ! -- WIN1256 --> UTF8 ! SELECT CONVERT('foo' USING windows_1256_to_utf8); ! SELECT CONVERT('foo', 'WIN1256', 'UTF8'); ! -- UTF8 --> WIN874 ! SELECT CONVERT('foo' USING utf8_to_windows_874); ! SELECT CONVERT('foo', 'UTF8', 'WIN874'); ! -- WIN874 --> UTF8 ! SELECT CONVERT('foo' USING windows_874_to_utf8); ! SELECT CONVERT('foo', 'WIN874', 'UTF8'); -- -- return to the super user --