Commit 152a101f authored by Peter Eisentraut's avatar Peter Eisentraut

Allow WIN1250 as server encoding.

parent 04288408
<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.44 2004/03/23 02:47:35 neilc Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.45 2004/09/17 21:59:56 petere Exp $ -->
<chapter id="charset"> <chapter id="charset">
<title>Localization</> <title>Localization</>
...@@ -396,14 +396,22 @@ initdb --locale=sv_SE ...@@ -396,14 +396,22 @@ initdb --locale=sv_SE
<entry><literal>KOI8</literal></entry> <entry><literal>KOI8</literal></entry>
<entry><acronym>KOI</acronym>8-R(U)</entry> <entry><acronym>KOI</acronym>8-R(U)</entry>
</row> </row>
<row>
<entry><literal>WIN</literal></entry>
<entry>Windows CP1251</entry>
</row>
<row> <row>
<entry><literal>ALT</literal></entry> <entry><literal>ALT</literal></entry>
<entry>Windows CP866</entry> <entry>Windows CP866</entry>
</row> </row>
<row>
<entry><literal>WIN874</literal></entry>
<entry>Windows CP874 (Thai)</entry>
</row>
<row>
<entry><literal>WIN1250</literal></entry>
<entry>Windows CP1250</entry>
</row>
<row>
<entry><literal>WIN</literal></entry>
<entry>Windows CP1251</entry>
</row>
<row> <row>
<entry><literal>WIN1256</literal></entry> <entry><literal>WIN1256</literal></entry>
<entry>Windows CP1256 (Arabic)</entry> <entry>Windows CP1256 (Arabic)</entry>
...@@ -412,10 +420,6 @@ initdb --locale=sv_SE ...@@ -412,10 +420,6 @@ initdb --locale=sv_SE
<entry><literal>TCVN</literal></entry> <entry><literal>TCVN</literal></entry>
<entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry> <entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry>
</row> </row>
<row>
<entry><literal>WIN874</literal></entry>
<entry>Windows CP874 (Thai)</entry>
</row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
...@@ -677,14 +681,26 @@ $ <userinput>psql -l</userinput> ...@@ -677,14 +681,26 @@ $ <userinput>psql -l</userinput>
</entry> </entry>
</row> </row>
<row> <row>
<entry><literal>WIN</literal></entry> <entry><literal>ALT</literal></entry>
<entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>, <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>,
<literal>ALT</literal>, <literal>KOI8</literal>, <literal>ALT</literal>, <literal>KOI8</literal>,
<literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
</entry> </entry>
</row> </row>
<row> <row>
<entry><literal>ALT</literal></entry> <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>, <entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>,
<literal>ALT</literal>, <literal>KOI8</literal>, <literal>ALT</literal>, <literal>KOI8</literal>,
<literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal> <literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
...@@ -702,12 +718,6 @@ $ <userinput>psql -l</userinput> ...@@ -702,12 +718,6 @@ $ <userinput>psql -l</userinput>
<literal>UNICODE</literal> <literal>UNICODE</literal>
</entry> </entry>
</row> </row>
<row>
<entry><literal>WIN874</literal></entry>
<entry><literal>WIN874</literal>,
<literal>UNICODE</literal>
</entry>
</row>
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Encoding names and routines for work with it. All * Encoding names and routines for work with it. All
* in this file is shared bedween FE and BE. * in this file is shared bedween FE and BE.
* *
* $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.18 2003/11/29 22:39:59 pgsql Exp $ * $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.19 2004/09/17 21:59:57 petere Exp $
*/ */
#ifdef FRONTEND #ifdef FRONTEND
#include "postgres_fe.h" #include "postgres_fe.h"
...@@ -340,6 +340,9 @@ pg_enc2name pg_enc2name_tbl[] = ...@@ -340,6 +340,9 @@ pg_enc2name pg_enc2name_tbl[] =
{ {
"ISO_8859_8", PG_ISO_8859_8 "ISO_8859_8", PG_ISO_8859_8
}, },
{
"WIN1250", PG_WIN1250
},
{ {
"SJIS", PG_SJIS "SJIS", PG_SJIS
}, },
...@@ -352,9 +355,6 @@ pg_enc2name pg_enc2name_tbl[] = ...@@ -352,9 +355,6 @@ pg_enc2name pg_enc2name_tbl[] =
{ {
"UHC", PG_UHC "UHC", PG_UHC
}, },
{
"WIN1250", PG_WIN1250
},
{ {
"GB18030", PG_GB18030 "GB18030", PG_GB18030
} }
......
/* /*
* conversion functions between pg_wchar and multibyte streams. * conversion functions between pg_wchar and multibyte streams.
* Tatsuo Ishii * Tatsuo Ishii
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.37 2004/08/29 05:06:51 momjian Exp $ * $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.38 2004/09/17 21:59:57 petere Exp $
* *
* WIN1250 client encoding updated by Pavel Behal * WIN1250 client encoding updated by Pavel Behal
* *
...@@ -743,11 +743,11 @@ pg_wchar_tbl pg_wchar_table[] = { ...@@ -743,11 +743,11 @@ pg_wchar_tbl pg_wchar_table[] = {
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 25; ISO-8859-6 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 25; ISO-8859-6 */
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 26; ISO-8859-7 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 26; ISO-8859-7 */
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 27; ISO-8859-8 */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 27; ISO-8859-8 */
{0, pg_sjis_mblen, pg_sjis_dsplen, 2}, /* 28; PG_SJIS */ {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 28; PG_WIN1250 */
{0, pg_big5_mblen, pg_big5_dsplen, 2}, /* 29; PG_BIG5 */ {0, pg_sjis_mblen, pg_sjis_dsplen, 2}, /* 29; PG_SJIS */
{0, pg_gbk_mblen, pg_gbk_dsplen, 2}, /* 30; PG_GBK */ {0, pg_big5_mblen, pg_big5_dsplen, 2}, /* 30; PG_BIG5 */
{0, pg_uhc_mblen, pg_uhc_dsplen, 2}, /* 31; PG_UHC */ {0, pg_gbk_mblen, pg_gbk_dsplen, 2}, /* 31; PG_GBK */
{pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 1}, /* 32; PG_WIN1250 */ {0, pg_uhc_mblen, pg_uhc_dsplen, 2}, /* 32; PG_UHC */
{0, pg_gb18030_mblen, pg_gb18030_dsplen, 2} /* 33; PG_GB18030 */ {0, pg_gb18030_mblen, pg_gb18030_dsplen, 2} /* 33; PG_GB18030 */
}; };
......
/* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.51 2004/08/29 05:06:56 momjian Exp $ */ /* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.52 2004/09/17 21:59:57 petere Exp $ */
#ifndef PG_WCHAR_H #ifndef PG_WCHAR_H
#define PG_WCHAR_H #define PG_WCHAR_H
...@@ -177,19 +177,19 @@ typedef enum pg_enc ...@@ -177,19 +177,19 @@ typedef enum pg_enc
PG_ISO_8859_6, /* ISO-8859-6 */ PG_ISO_8859_6, /* ISO-8859-6 */
PG_ISO_8859_7, /* ISO-8859-7 */ PG_ISO_8859_7, /* ISO-8859-7 */
PG_ISO_8859_8, /* ISO-8859-8 */ PG_ISO_8859_8, /* ISO-8859-8 */
PG_WIN1250, /* windows-1250 */
/* followings are for client encoding only */ /* followings are for client encoding only */
PG_SJIS, /* Shift JIS (Winindows-932) */ PG_SJIS, /* Shift JIS (Winindows-932) */
PG_BIG5, /* Big5 (Windows-950) */ PG_BIG5, /* Big5 (Windows-950) */
PG_GBK, /* GBK (Windows-936) */ PG_GBK, /* GBK (Windows-936) */
PG_UHC, /* UHC (Windows-949) */ PG_UHC, /* UHC (Windows-949) */
PG_WIN1250, /* windows-1250 */
PG_GB18030, /* GB18030 */ PG_GB18030, /* GB18030 */
_PG_LAST_ENCODING_ /* mark only */ _PG_LAST_ENCODING_ /* mark only */
} pg_enc; } pg_enc;
#define PG_ENCODING_BE_LAST PG_ISO_8859_8 #define PG_ENCODING_BE_LAST PG_WIN1250
#define PG_ENCODING_FE_LAST PG_GB18030 #define PG_ENCODING_FE_LAST PG_GB18030
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment