Skip to content
Browse files

Rename canonical encodings, per Peter:

	UNICODE => UTF8
	ALT => WIN866
	WIN => WIN1251
	TCVN => WIN1258

The old codes continue to work.
  • Loading branch information...
1 parent fb4c2dd commit deb77a6d58a39e0c39780cb8abd41fd4c7d18c33 @bmomjian bmomjian committed Mar 7, 2005
Showing with 900 additions and 965 deletions.
  1. +1 −1 doc/README.mb.jp
  2. +1 −1 doc/TODO
  3. +51 −51 doc/src/sgml/charset.sgml
  4. +154 −154 doc/src/sgml/func.sgml
  5. +4 −4 doc/src/sgml/ref/alter_conversion.sgml
  6. +1 −1 doc/src/sgml/ref/comment.sgml
  7. +2 −2 doc/src/sgml/ref/create_conversion.sgml
  8. +1 −1 src/backend/utils/adt/selfuncs.c
  9. +2 −2 src/backend/utils/mb/Unicode/Makefile
  10. +2 −2 src/backend/utils/mb/Unicode/UCS_to_8859.pl
  11. +1 −1 src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
  12. +1 −1 src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
  13. +3 −3 src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
  14. +1 −1 src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
  15. +1 −1 src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
  16. +1 −1 src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
  17. +1 −1 src/backend/utils/mb/Unicode/UCS_to_GBK.pl
  18. +1 −1 src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl
  19. +1 −1 src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
  20. +1 −1 src/backend/utils/mb/Unicode/UCS_to_UHC.pl
  21. +1 −1 src/backend/utils/mb/Unicode/UCS_to_WIN874.pl
  22. +2 −2 src/backend/utils/mb/Unicode/UCS_to_WINX.pl
  23. +4 −4 src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl
  24. +1 −1 src/backend/utils/mb/Unicode/{utf8_to_tcvn.map → utf8_to_win1258.map}
  25. +1 −1 src/backend/utils/mb/Unicode/{utf8_to_alt.map → utf8_to_win866.map}
  26. +1 −1 src/backend/utils/mb/Unicode/{tcvn_to_utf8.map → win1258_to_utf8.map}
  27. +1 −1 src/backend/utils/mb/Unicode/{alt_to_utf8.map → win866_to_utf8.map}
  28. +6 −6 src/backend/utils/mb/conv.c
  29. +73 −73 src/backend/utils/mb/conversion_procs/Makefile
  30. +51 −51 src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c
  31. +4 −4 src/backend/utils/mb/conversion_procs/regress_prolog
  32. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_ascii/utf8_and_ascii.c
  33. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_big5/utf8_and_big5.c
  34. +14 −14 src/backend/utils/mb/conversion_procs/utf8_and_cyrillic/utf8_and_cyrillic.c
  35. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_euc_cn/utf8_and_euc_cn.c
  36. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/utf8_and_euc_jp.c
  37. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_euc_kr/utf8_and_euc_kr.c
  38. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_euc_tw/utf8_and_euc_tw.c
  39. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_gb18030/utf8_and_gb18030.c
  40. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_gbk/utf8_and_gbk.c
  41. +6 −6 src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
  42. +2 −2 src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c
  43. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c
  44. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c
  45. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c
  46. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_win1250/utf8_and_win1250.c
  47. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_win1256/utf8_and_win1256.c
  48. +1 −1 src/backend/utils/mb/conversion_procs/{utf8_and_tcvn → utf8_and_win1258}/Makefile
  49. +15 −15 ...d/utils/mb/conversion_procs/{utf8_and_tcvn/utf8_and_tcvn.c → utf8_and_win1258/utf8_and_win1258.c}
  50. +1 −1 src/backend/utils/mb/conversion_procs/utf8_and_win874/utf8_and_win874.c
  51. +29 −20 src/backend/utils/mb/encnames.c
  52. +1 −1 src/backend/utils/mb/mbutils.c
  53. +5 −5 src/backend/utils/mb/wchar.c
  54. +0 −74 src/backend/utils/mb/win.c
  55. 0 src/backend/utils/mb/{alt.c → win866.c}
  56. +3 −3 src/bin/initdb/initdb.c
  57. +7 −7 src/include/mb/pg_wchar.h
  58. +2 −2 src/test/mb/mbregress.sh
  59. +213 −213 src/test/regress/expected/conversion.out
  60. +212 −212 src/test/regress/sql/conversion.sql
View
2 doc/README.mb.jp
@@ -299,7 +299,7 @@ o set client_encoding $B%3%^%s%I$r;H$&J}K!(B
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;
+ 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
View
2 doc/TODO
@@ -215,7 +215,7 @@ Multi-Language Support
* Optimize locale to have minimal performance impact when not used
* Support multiple simultaneous character sets, per SQL92
-* Improve Unicode combined character handling (?)
+* Improve UTF8 combined character handling (?)
* Add octet_length_server() and octet_length_client()
* Make octet_length_client() the same as octet_length()?
View
102 doc/src/sgml/charset.sgml
@@ -285,7 +285,7 @@ initdb --locale=sv_SE
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
+ 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,8 +339,8 @@ initdb --locale=sv_SE
<entry>Taiwan <acronym>EUC</acronym></entry>
</row>
<row>
- <entry><literal>UNICODE</literal></entry>
- <entry>Unicode (<acronym>UTF</acronym>-8)</entry>
+ <entry><literal>UTF8</literal></entry>
+ <entry>UTF-8 (Unicode, 8-bit)</entry>
</row>
<row>
<entry><literal>MULE_INTERNAL</literal></entry>
@@ -407,7 +407,7 @@ initdb --locale=sv_SE
<entry><acronym>KOI</acronym>8-R(U)</entry>
</row>
<row>
- <entry><literal>ALT</literal></entry>
+ <entry><literal>WIN866</literal></entry>
<entry>Windows CP866</entry>
</row>
<row>
@@ -419,16 +419,16 @@ initdb --locale=sv_SE
<entry>Windows CP1250</entry>
</row>
<row>
- <entry><literal>WIN</literal></entry>
+ <entry><literal>WIN1251</literal></entry>
<entry>Windows CP1251</entry>
</row>
<row>
<entry><literal>WIN1256</literal></entry>
<entry>Windows CP1256 (Arabic)</entry>
</row>
<row>
- <entry><literal>TCVN</literal></entry>
- <entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry>
+ <entry><literal>WIN1258</literal></entry>
+ <entry>Windows CP1258 (Vietnamese)/<acronym>TCVN</>-5712</entry>
</row>
</tbody>
</tgroup>
@@ -504,7 +504,7 @@ $ <userinput>psql -l</userinput>
regression | t-ishii | SQL_ASCII
template1 | t-ishii | EUC_JP
test | t-ishii | EUC_JP
- unicode | t-ishii | UNICODE
+ utf8 | t-ishii | UTF8
(9 rows)
</screen>
</para>
@@ -561,126 +561,126 @@ $ <userinput>psql -l</userinput>
<tbody>
<row>
<entry><literal>SQL_ASCII</literal></entry>
- <entry><literal>SQL_ASCII</literal>, <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
+ <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>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
+ <literal>UTF8</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><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>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
+ <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>UNICODE</literal>
+ <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>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
+ <literal>UTF8</literal>, <literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN1</literal></entry>
- <entry><literal>LATIN1</literal>, <literal>UNICODE</literal>
+ <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>UNICODE</literal>,
+ <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN3</literal></entry>
- <entry><literal>LATIN3</literal>, <literal>UNICODE</literal>,
+ <entry><literal>LATIN3</literal>, <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN4</literal></entry>
- <entry><literal>LATIN4</literal>, <literal>UNICODE</literal>,
+ <entry><literal>LATIN4</literal>, <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN5</literal></entry>
- <entry><literal>LATIN5</literal>, <literal>UNICODE</literal>
+ <entry><literal>LATIN5</literal>, <literal>UTF8</literal>
</entry>
</row>
<row>
<entry><literal>LATIN6</literal></entry>
- <entry><literal>LATIN6</literal>, <literal>UNICODE</literal>,
+ <entry><literal>LATIN6</literal>, <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN7</literal></entry>
- <entry><literal>LATIN7</literal>, <literal>UNICODE</literal>,
+ <entry><literal>LATIN7</literal>, <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN8</literal></entry>
- <entry><literal>LATIN8</literal>, <literal>UNICODE</literal>,
+ <entry><literal>LATIN8</literal>, <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN9</literal></entry>
- <entry><literal>LATIN9</literal>, <literal>UNICODE</literal>,
+ <entry><literal>LATIN9</literal>, <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>
</entry>
</row>
<row>
<entry><literal>LATIN10</literal></entry>
- <entry><literal>LATIN10</literal>, <literal>UNICODE</literal>,
+ <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>UNICODE</literal>,
+ <literal>UTF8</literal>,
<literal>MULE_INTERNAL</literal>,
- <literal>WIN</literal>,
- <literal>ALT</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>UNICODE</literal>
+ <literal>UTF8</literal>
</entry>
</row>
<row>
<entry><literal>ISO_8859_7</literal></entry>
<entry><literal>ISO_8859_7</literal>,
- <literal>UNICODE</literal>
+ <literal>UTF8</literal>
</entry>
</row>
<row>
<entry><literal>ISO_8859_8</literal></entry>
<entry><literal>ISO_8859_8</literal>,
- <literal>UNICODE</literal>
+ <literal>UTF8</literal>
</entry>
</row>
<row>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
<entry>
<literal>EUC_JP</literal>, <literal>SJIS</literal>,
<literal>EUC_KR</literal>, <literal>UHC</literal>, <literal>JOHAB</literal>,
@@ -691,10 +691,10 @@ $ <userinput>psql -l</userinput>
<literal>ISO_8859_6</literal>,
<literal>ISO_8859_7</literal>,
<literal>ISO_8859_8</literal>,
- <literal>WIN</literal>, <literal>ALT</literal>,
+ <literal>WIN1251</literal>, <literal>WIN866</literal>,
<literal>KOI8</literal>,
<literal>WIN1256</literal>,
- <literal>TCVN</literal>,
+ <literal>WIN1258</literal>,
<literal>WIN874</literal>,
<literal>GB18030</literal>,
<literal>WIN1250</literal>
@@ -704,53 +704,53 @@ $ <userinput>psql -l</userinput>
<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>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>WIN</literal>,
- <literal>ALT</literal>, <literal>KOI8</literal>,
- <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
+ <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>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><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>UNICODE</literal>
+ <literal>UTF8</literal>
</entry>
</row>
<row>
<entry><literal>WIN1250</literal></entry>
<entry><literal>LATIN2</literal>, <literal>WIN1250</literal>,
- <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
+ <literal>UTF8</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><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>UNICODE</literal>
+ <literal>UTF8</literal>
</entry>
</row>
<row>
- <entry><literal>TCVN</literal></entry>
- <entry><literal>TCVN</literal>,
- <literal>UNICODE</literal>
+ <entry><literal>WIN1258</literal></entry>
+ <entry><literal>WIN1258</literal>,
+ <literal>UTF8</literal>
</entry>
</row>
</tbody>
View
308 doc/src/sgml/func.sgml
@@ -933,8 +933,8 @@ PostgreSQL documentation
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>
+ <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,8 +1105,8 @@ PostgreSQL documentation
<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>
+ <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,9 +1421,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>ascii_to_utf_8</literal></entry>
+ <entry><literal>ascii_to_utf8</literal></entry>
<entry><literal>SQL_ASCII</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1439,9 +1439,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>big5_to_utf_8</literal></entry>
+ <entry><literal>big5_to_utf8</literal></entry>
<entry><literal>BIG5</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1451,9 +1451,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>euc_cn_to_utf_8</literal></entry>
+ <entry><literal>euc_cn_to_utf8</literal></entry>
<entry><literal>EUC_CN</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1469,9 +1469,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>euc_jp_to_utf_8</literal></entry>
+ <entry><literal>euc_jp_to_utf8</literal></entry>
<entry><literal>EUC_JP</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1481,9 +1481,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>euc_kr_to_utf_8</literal></entry>
+ <entry><literal>euc_kr_to_utf8</literal></entry>
<entry><literal>EUC_KR</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1499,51 +1499,51 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>euc_tw_to_utf_8</literal></entry>
+ <entry><literal>euc_tw_to_utf8</literal></entry>
<entry><literal>EUC_TW</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>gb18030_to_utf_8</literal></entry>
+ <entry><literal>gb18030_to_utf8</literal></entry>
<entry><literal>GB18030</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>gbk_to_utf_8</literal></entry>
+ <entry><literal>gbk_to_utf8</literal></entry>
<entry><literal>GBK</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_10_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_10_to_utf8</literal></entry>
<entry><literal>LATIN6</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_13_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_13_to_utf8</literal></entry>
<entry><literal>LATIN7</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_14_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_14_to_utf8</literal></entry>
<entry><literal>LATIN8</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_15_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_15_to_utf8</literal></entry>
<entry><literal>LATIN9</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_16_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_16_to_utf8</literal></entry>
<entry><literal>LATIN10</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1553,9 +1553,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>iso_8859_1_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_1_to_utf8</literal></entry>
<entry><literal>LATIN1</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1565,9 +1565,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>iso_8859_2_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_2_to_utf8</literal></entry>
<entry><literal>LATIN2</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1583,9 +1583,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>iso_8859_3_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_3_to_utf8</literal></entry>
<entry><literal>LATIN3</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1595,9 +1595,9 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>iso_8859_4_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_4_to_utf8</literal></entry>
<entry><literal>LATIN4</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1613,51 +1613,51 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>iso_8859_5_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_5_to_utf8</literal></entry>
<entry><literal>ISO_8859_5</literal></entry>
- <entry><literal>UNICODE</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>WIN</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>ALT</literal></entry>
+ <entry><literal>WIN866</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_6_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_6_to_utf8</literal></entry>
<entry><literal>ISO_8859_6</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_7_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_7_to_utf8</literal></entry>
<entry><literal>ISO_8859_7</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_8_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_8_to_utf8</literal></entry>
<entry><literal>ISO_8859_8</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>iso_8859_9_to_utf_8</literal></entry>
+ <entry><literal>iso_8859_9_to_utf8</literal></entry>
<entry><literal>LATIN5</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>johab_to_utf_8</literal></entry>
+ <entry><literal>johab_to_utf8</literal></entry>
<entry><literal>JOHAB</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
@@ -1673,21 +1673,21 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>koi8_r_to_utf_8</literal></entry>
+ <entry><literal>koi8_r_to_utf8</literal></entry>
<entry><literal>KOI8</literal></entry>
- <entry><literal>UNICODE</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>WIN</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>ALT</literal></entry>
+ <entry><literal>WIN866</literal></entry>
</row>
<row>
@@ -1777,13 +1777,13 @@ PostgreSQL documentation
<row>
<entry><literal>mic_to_windows_1251</literal></entry>
<entry><literal>MULE_INTERNAL</literal></entry>
- <entry><literal>WIN</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>ALT</literal></entry>
+ <entry><literal>WIN866</literal></entry>
</row>
<row>
@@ -1799,212 +1799,212 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>sjis_to_utf_8</literal></entry>
+ <entry><literal>sjis_to_utf8</literal></entry>
<entry><literal>SJIS</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>tcvn_to_utf_8</literal></entry>
- <entry><literal>TCVN</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>tcvn_to_utf8</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_to_utf8</literal></entry>
<entry><literal>UHC</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
- <entry><literal>utf_8_to_ascii</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <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>utf_8_to_iso_8859_6</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <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>utf_8_to_iso_8859_7</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <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>utf_8_to_iso_8859_8</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <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>utf_8_to_iso_8859_9</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
- <entry><literal>TCVN</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
- <entry><literal>WIN</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
- <entry><literal>ALT</literal></entry>
+ <entry><literal>utf8_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>UNICODE</literal></entry>
+ <entry><literal>utf8_to_windows_874</literal></entry>
+ <entry><literal>UTF8</literal></entry>
<entry><literal>WIN874</literal></entry>
</row>
@@ -2021,81 +2021,81 @@ PostgreSQL documentation
</row>
<row>
- <entry><literal>windows_1250_to_utf_8</literal></entry>
+ <entry><literal>windows_1250_to_utf8</literal></entry>
<entry><literal>WIN1250</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
<entry><literal>windows_1251_to_iso_8859_5</literal></entry>
- <entry><literal>WIN</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>WIN</literal></entry>
+ <entry><literal>WIN1251</literal></entry>
<entry><literal>KOI8</literal></entry>
</row>
<row>
<entry><literal>windows_1251_to_mic</literal></entry>
- <entry><literal>WIN</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>WIN</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <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>WIN</literal></entry>
- <entry><literal>ALT</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>windows_1256_to_utf8</literal></entry>
<entry><literal>WIN1256</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
<row>
<entry><literal>windows_866_to_iso_8859_5</literal></entry>
- <entry><literal>ALT</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>ALT</literal></entry>
+ <entry><literal>WIN866</literal></entry>
<entry><literal>KOI8</literal></entry>
</row>
<row>
<entry><literal>windows_866_to_mic</literal></entry>
- <entry><literal>ALT</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>ALT</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <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>ALT</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>windows_874_to_utf8</literal></entry>
<entry><literal>WIN874</literal></entry>
- <entry><literal>UNICODE</literal></entry>
+ <entry><literal>UTF8</literal></entry>
</row>
</tbody>
@@ -3372,7 +3372,7 @@ substring('foobar' from 'o(.)b') <lineannotation>o</lineannotation>
<row>
<entry> <literal>\u</><replaceable>wxyz</> </entry>
<entry> (where <replaceable>wxyz</> is exactly four hexadecimal digits)
- the Unicode character <literal>U+</><replaceable>wxyz</>
+ the UTF16 (Unicode, 16-bit) character <literal>U+</><replaceable>wxyz</>
in the local byte ordering </entry>
</row>
View
8 doc/src/sgml/ref/alter_conversion.sgml
@@ -72,18 +72,18 @@ ALTER CONVERSION <replaceable>name</replaceable> OWNER TO <replaceable>newowner<
<title>Examples</title>
<para>
- To rename the conversion <literal>iso_8859_1_to_utf_8</literal> to
+ To rename the conversion <literal>iso_8859_1_to_utf8</literal> to
<literal>latin1_to_unicode</literal>:
<programlisting>
-ALTER CONVERSION iso_8859_1_to_utf_8 RENAME TO latin1_to_unicode;
+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_utf_8</literal> to
+ 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_utf_8 OWNER TO joe;
+ALTER CONVERSION iso_8859_1_to_utf8 OWNER TO joe;
</programlisting>
</para>
</refsect1>
View
2 doc/src/sgml/ref/comment.sgml
@@ -195,7 +195,7 @@ COMMENT ON TABLE mytable IS NULL;
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 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';
View
4 doc/src/sgml/ref/create_conversion.sgml
@@ -136,10 +136,10 @@ conv_proc(
<title>Examples</title>
<para>
- To create a conversion from encoding <literal>UNICODE</literal> to
+ To create a conversion from encoding <literal>UTF8</literal> to
<literal>LATIN1</literal> using <function>myfunc</>:
<programlisting>
-CREATE CONVERSION myconv FOR 'UNICODE' TO 'LATIN1' FROM myfunc;
+CREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc;
</programlisting>
</para>
</refsect1>
View
2 src/backend/utils/adt/selfuncs.c
@@ -4035,7 +4035,7 @@ pattern_selectivity(Const *patt, Pattern_Type ptype)
*
* 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
+ * encoding such as UTF8, so we do have to watch out for generating
* invalid encoding sequences.
*/
Const *
View
4 src/backend/utils/mb/Unicode/Makefile
@@ -18,8 +18,8 @@ ISO8859MAPS=iso8859_2_to_utf8.map iso8859_3_to_utf8.map \
utf8_to_iso8859_4.map utf8_to_iso8859_5.map
-CYRILLICMAPS=koi8r_to_utf8.map win1251_to_utf8.map alt_to_utf8.map\
- utf8_to_koi8r.map utf8_to_win1251.map utf8_to_alt.map
+CYRILLICMAPS=koi8r_to_utf8.map win1251_to_utf8.map win866_to_utf8.map\
+ utf8_to_koi8r.map utf8_to_win1251.map utf8_to_win866.map
MAPS= $(ISO8859MAPS) $(CYRILLICMAPS)\
big5_to_utf8.map euc_cn_to_utf8.map euc_jp_to_utf8.map \
View
4 src/backend/utils/mb/Unicode/UCS_to_8859.pl
@@ -39,7 +39,7 @@
if( $code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
@@ -83,7 +83,7 @@
if($code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
6 src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
@@ -51,7 +51,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
@@ -80,7 +80,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
@@ -108,7 +108,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
@@ -36,7 +36,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_GBK.pl
@@ -36,7 +36,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
@@ -52,7 +52,7 @@
|| (( $code >= 0x879a )
&& ( $code <= 0x879c )))
{
- printf STDERR "Warning: duplicate unicode : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code;
+ printf STDERR "Warning: duplicate UTF8 : UCS=0x%04x SJIS=0x%04x\n",$ucs,$code;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_UHC.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 src/backend/utils/mb/Unicode/UCS_to_WIN874.pl
@@ -35,7 +35,7 @@
if( $code >= 0x80 && $ucs >= 0x0080 ){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
4 src/backend/utils/mb/Unicode/UCS_to_WINX.pl
@@ -42,7 +42,7 @@
if( $code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
@@ -86,7 +86,7 @@
if($code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
8 src/backend/utils/mb/Unicode/UCS_to_cyrillic.pl
@@ -17,8 +17,8 @@
require "ucs2utf.pl";
%filename = ('KOI8R'=>'koi8-r.txt',
'WIN1251'=>'cp1251.txt',
- 'ALT'=>'cp866.txt');
-@charsets = ('KOI8R','ALT','WIN1251');
+ 'WIN866'=>'cp866.txt');
+@charsets = ('KOI8R','WIN866','WIN1251');
foreach $charset (@charsets) {
#
@@ -41,7 +41,7 @@
if( $code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
@@ -85,7 +85,7 @@
if($code >= 0x80){
$utf = &ucs2utf($ucs);
if( $array{ $utf } ne "" ){
- printf STDERR "Warning: duplicate unicode: %04x\n",$ucs;
+ printf STDERR "Warning: duplicate UTF8: %04x\n",$ucs;
next;
}
$count++;
View
2 ...backend/utils/mb/Unicode/utf8_to_tcvn.map → ...kend/utils/mb/Unicode/utf8_to_win1258.map
@@ -1,4 +1,4 @@
-static pg_utf_to_local ULmapTCVN[ 120 ] = {
+static pg_utf_to_local ULmapWIN1258[ 120 ] = {
{0x0000, 0x0081},
{0xc2a0, 0x00a0},
{0xc2a1, 0x00a1},
View
2 src/backend/utils/mb/Unicode/utf8_to_alt.map → ...ckend/utils/mb/Unicode/utf8_to_win866.map
@@ -1,4 +1,4 @@
-static pg_utf_to_local ULmap_ALT[ 128 ] = {
+static pg_utf_to_local ULmap_WIN866[ 128 ] = {
{0xc2a0, 0x00ff},
{0xc2a4, 0x00fd},
{0xc2b0, 0x00f8},
View
2 ...backend/utils/mb/Unicode/tcvn_to_utf8.map → ...kend/utils/mb/Unicode/win1258_to_utf8.map
@@ -1,4 +1,4 @@
-static pg_local_to_utf LUmapTCVN[ 128 ] = {
+static pg_local_to_utf LUmapWIN1258[ 128 ] = {
{0x0080, 0xe282ac},
{0x0081, 0x0000},
{0x0082, 0xe2809a},
View
2 src/backend/utils/mb/Unicode/alt_to_utf8.map → ...ckend/utils/mb/Unicode/win866_to_utf8.map
@@ -1,4 +1,4 @@
-static pg_local_to_utf LUmapALT[ 128 ] = {
+static pg_local_to_utf LUmapWIN866[ 128 ] = {
{0x0080, 0xd090},
{0x0081, 0xd091},
{0x0082, 0xd092},
View
12 src/backend/utils/mb/conv.c
@@ -303,7 +303,7 @@ mic2latin_with_table(
/*
* comparison routine for bsearch()
- * this routine is intended for UTF-8 -> local code
+ * this routine is intended for UTF8 -> local code
*/
static int
compare1(const void *p1, const void *p2)
@@ -318,7 +318,7 @@ compare1(const void *p1, const void *p2)
/*
* comparison routine for bsearch()
- * this routine is intended for local code -> UTF-8
+ * this routine is intended for local code -> UTF8
*/
static int
compare2(const void *p1, const void *p2)
@@ -332,9 +332,9 @@ compare2(const void *p1, const void *p2)
}
/*
- * UTF-8 ---> local code
+ * UTF8 ---> local code
*
- * utf: input UTF-8 string. Its length is limited by "len" parameter
+ * 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,7 +373,7 @@ UtfToLocal(unsigned char *utf, unsigned char *iso,
{
ereport(WARNING,
(errcode(ERRCODE_UNTRANSLATABLE_CHARACTER),
- errmsg("ignoring unconvertible UTF-8 character 0x%04x",
+ errmsg("ignoring unconvertible UTF8 character 0x%04x",
iutf)));
continue;
}
@@ -390,7 +390,7 @@ UtfToLocal(unsigned char *utf, unsigned char *iso,
}
/*
- * local code ---> UTF-8
+ * local code ---> UTF8
*/
void
LocalToUtf(unsigned char *iso, unsigned char *utf,
View
146 src/backend/utils/mb/conversion_procs/Makefile
@@ -23,7 +23,7 @@ DIRS = \
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_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,20 +36,20 @@ CONVERSIONS = \
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 \
+ 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 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 \
+ 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 ALT iso_to_alt cyrillic_and_mic \
- windows_866_to_iso_8859_5 ALT ISO-8859-5 alt_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,70 +78,70 @@ CONVERSIONS = \
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
+ 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
View
102 src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c
@@ -23,41 +23,41 @@ PG_FUNCTION_INFO_V1(iso_to_mic);
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(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_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(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_alt);
-PG_FUNCTION_INFO_V1(alt_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);
extern Datum iso_to_mic(PG_FUNCTION_ARGS);
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 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_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 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_alt(PG_FUNCTION_ARGS);
-extern Datum alt_to_iso(PG_FUNCTION_ARGS);
+extern Datum iso_to_win866(PG_FUNCTION_ARGS);
+extern Datum win866_to_iso(PG_FUNCTION_ARGS);
/* ----------
* conv_proc(
@@ -76,8 +76,8 @@ static void iso2mic(unsigned char *l, unsigned char *p, int len);
static void mic2iso(unsigned char *mic, unsigned char *p, int len);
static void win12512mic(unsigned char *l, unsigned char *p, int len);
static void mic2win1251(unsigned char *mic, unsigned char *p, int len);
-static void alt2mic(unsigned char *l, unsigned char *p, int len);
-static void mic2alt(unsigned char *mic, unsigned char *p, int len);
+static void win8662mic(unsigned char *l, unsigned char *p, int len);
+static void mic2win866(unsigned char *mic, unsigned char *p, int len);
Datum
koi8r_to_mic(PG_FUNCTION_ARGS)
@@ -176,33 +176,33 @@ mic_to_win1251(PG_FUNCTION_ARGS)
}
Datum
-alt_to_mic(PG_FUNCTION_ARGS)
+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_ALT);
+ Assert(PG_GETARG_INT32(0) == PG_WIN866);
Assert(PG_GETARG_INT32(1) == PG_MULE_INTERNAL);
Assert(len >= 0);
- alt2mic(src, dest, len);
+ win8662mic(src, dest, len);
PG_RETURN_VOID();
}
Datum
-mic_to_alt(PG_FUNCTION_ARGS)
+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_ALT);
+ Assert(PG_GETARG_INT32(1) == PG_WIN866);
Assert(len >= 0);
- mic2alt(src, dest, len);
+ mic2win866(src, dest, len);
PG_RETURN_VOID();
}
@@ -248,80 +248,80 @@ win1251_to_koi8r(PG_FUNCTION_ARGS)
}
Datum
-koi8r_to_alt(PG_FUNCTION_ARGS)
+koi8r_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);
unsigned char *buf;
Assert(PG_GETARG_INT32(0) == PG_KOI8R);
- Assert(PG_GETARG_INT32(1) == PG_ALT);
+ Assert(PG_GETARG_INT32(1) == PG_WIN866);
Assert(len >= 0);
buf = palloc(len * ENCODING_GROWTH_RATE);
koi8r2mic(src, buf, len);
- mic2alt(buf, dest, strlen(buf));
+ mic2win866(buf, dest, strlen(buf));
pfree(buf);
PG_RETURN_VOID();
}
Datum
-alt_to_koi8r(PG_FUNCTION_ARGS)
+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_ALT);
+ Assert(PG_GETARG_INT32(0) == PG_WIN866);
Assert(PG_GETARG_INT32(1) == PG_KOI8R);
Assert(len >= 0);
buf = palloc(len * ENCODING_GROWTH_RATE);
- alt2mic(src, buf, len);
+ win8662mic(src, buf, len);
mic2koi8r(buf, dest, strlen(buf));
pfree(buf);
PG_RETURN_VOID();
}
Datum
-alt_to_win1251(PG_FUNCTION_ARGS)
+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_ALT);
+ Assert(PG_GETARG_INT32(0) == PG_WIN866);
Assert(PG_GETARG_INT32(1) == PG_WIN1251);
Assert(len >= 0);
buf = palloc(len * ENCODING_GROWTH_RATE);
- alt2mic(src, buf, len);
+ win8662mic(src, buf, len);
mic2win1251(buf, dest, strlen(buf));
pfree(buf);
PG_RETURN_VOID();
}
Datum
-win1251_to_alt(PG_FUNCTION_ARGS)
+win1251_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);
unsigned char *buf;
Assert(PG_GETARG_INT32(0) == PG_WIN1251);
- Assert(PG_GETARG_INT32(1) == PG_ALT);
+ Assert(PG_GETARG_INT32(1) == PG_WIN866);
Assert(len >= 0);
buf = palloc(len * ENCODING_GROWTH_RATE);
win12512mic(src, buf, len);
- mic2alt(buf, dest, strlen(buf));
+ mic2win866(buf, dest, strlen(buf));
pfree(buf);
PG_RETURN_VOID();
@@ -408,40 +408,40 @@ win1251_to_iso(PG_FUNCTION_ARGS)
}
Datum
-iso_to_alt(PG_FUNCTION_ARGS)
+iso_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);
unsigned char *buf;
Assert(PG_GETARG_INT32(0) == PG_ISO_8859_5);
- Assert(PG_GETARG_INT32(1) == PG_ALT);
+ Assert(PG_GETARG_INT32(1) == PG_WIN866);
Assert(len >= 0);
buf = palloc(len * ENCODING_GROWTH_RATE);
iso2mic(src, buf, len);
- mic2alt(buf, dest, strlen(buf));
+ mic2win866(buf, dest, strlen(buf));
pfree(buf);
PG_RETURN_VOID();
}
Datum
-alt_to_iso(PG_FUNCTION_ARGS)
+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_ALT);
+ Assert(PG_GETARG_INT32(0) == PG_WIN866);
Assert(PG_GETARG_INT32(1) == PG_ISO_8859_5);
Assert(len >= 0);
buf = palloc(len * ENCODING_GROWTH_RATE);
- alt2mic(src, buf, len);
- mic2alt(buf, dest, strlen(buf));
+ win8662mic(src, buf, len);
+ mic2win866(buf, dest, strlen(buf));
pfree(buf);
PG_RETURN_VOID();
@@ -576,11 +576,11 @@ mic2win1251(unsigned char *mic, unsigned char *p, int len)
mic2latin_with_table(mic, p, len, LC_KOI8_R, koi2win);
}
-/* alt2mic: CP866 to Mule internal code */
+/* win8662mic: CP866 to Mule internal code */
static void
-alt2mic(unsigned char *l, unsigned char *p, int len)
+win8662mic(unsigned char *l, unsigned char *p, int len)
{
- static unsigned char alt2koi[] = {
+ static unsigned char win8662koi[] = {
0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa,
0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0,
0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe,
@@ -599,14 +599,14 @@ alt2mic(unsigned char *l, unsigned char *p, int len)
0xb6, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
- latin2mic_with_table(l, p, len, LC_KOI8_R, alt2koi);
+ latin2mic_with_table(l, p, len, LC_KOI8_R, win8662koi);
}
-/* mic2alt: Mule internal code to CP866 */
+/* mic2win866: Mule internal code to CP866 */
static void
-mic2alt(unsigned char *mic, unsigned char *p, int len)
+mic2win866(unsigned char *mic, unsigned char *p, int len)
{
- static unsigned char koi2alt[] = {
+ static unsigned char koi2win866[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -625,5 +625,5 @@ mic2alt(unsigned char *mic, unsigned char *p, int len)
0x9c, 0x9b, 0x87, 0x98, 0x9d, 0x99, 0x97, 0x9a
};
- mic2latin_with_table(mic, p, len, LC_KOI8_R, koi2alt);
+ mic2latin_with_table(mic, p, len, LC_KOI8_R, koi2win866);
}
View
8 src/backend/utils/mb/conversion_procs/regress_prolog
@@ -3,19 +3,19 @@
--
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;
+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 'UNICODE' FROM iso8859_1_to_utf8;
+CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' FROM iso8859_1_to_utf8;
--
-- create default conversion with qualified name
--