Skip site navigation (1) Skip section navigation (2)

Re: Charset WIN1252

From: Roland Volkmann <roland(dot)volkmann(at)gmx(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Charset WIN1252
Date: 2004-11-30 01:05:31
Message-ID: 41ABC75B.6020707@gmx.de (view raw or flat)
Thread:
Lists: pgsql-patches
Hello Peter, Hello Bruce,


Peter Eisentraut schrieb am 29.11.2004 08:11:

>Bruce Momjian wrote:
>  
>
>>Your patch has been added to the PostgreSQL unapplied patches list
>>at:
>>
>> http://momjian.postgresql.org/cgi-bin/pgpatches
>>
>>It will be applied as soon as one of the PostgreSQL committers
>>reviews and approves it.
>>    
>>
>
>He should send a patch, not a source tarball, so it's possible to see 
>what actually changed.
>

this is the first time, I use CVS (TortoisCVS), so I hope the result is 
what you were missing:


Index: src/include/mb/pg_wchar.h
===================================================================
RCS file: 
Y:\CVS_Repositories\postgres.org/postgresql-8.0.0beta5/src/include/mb/pg_wchar.h,v
retrieving revision 1.1
diff -u -r1.1 pg_wchar.h
--- src/include/mb/pg_wchar.h    30 Nov 2004 00:49:17 -0000    1.1
+++ src/include/mb/pg_wchar.h    31 Oct 2004 19:08:58 -0000
@@ -178,6 +178,7 @@
     PG_ISO_8859_7,                /* ISO-8859-7 */
     PG_ISO_8859_8,                /* ISO-8859-8 */
     PG_WIN1250,                    /* windows-1250 */
+    PG_WIN1252,                    /* windows-1252 */
 
     /* followings are for client encoding only */
     PG_SJIS,                    /* Shift JIS (Winindows-932) */
@@ -189,7 +190,7 @@
 
 } pg_enc;
 
-#define PG_ENCODING_BE_LAST PG_WIN1250
+#define PG_ENCODING_BE_LAST PG_WIN1252
 #define PG_ENCODING_FE_LAST PG_GB18030
 
 /*


Index: src/backend/utils/mb/encnames.c
===================================================================
RCS file: 
Y:\CVS_Repositories\postgres.org/postgresql-8.0.0beta5/src/backend/utils/mb/encnames.c,v
retrieving revision 1.1
diff -u -r1.1 encnames.c
--- src/backend/utils/mb/encnames.c    30 Nov 2004 00:51:56 -0000    1.1
+++ src/backend/utils/mb/encnames.c    31 Oct 2004 19:09:16 -0000
@@ -194,6 +194,9 @@
         "win1251", PG_WIN1251
     },                            /* alias for Windows-1251 */
     {
+        "win1252", PG_WIN1252
+    },                            /* alias for Windows-1252 */
+    {
         "win1256", PG_WIN1256
     },                            /* alias for Windows-1256 */
     {
@@ -221,6 +224,9 @@
         "windows1251", PG_WIN1251
     },                            /* Windows-1251; Microsoft */
     {
+        "windows1252", PG_WIN1252
+    },                            /* Windows-1251; Microsoft */
+    {
         "windows1256", PG_WIN1256
     },                            /* Windows-1256; Microsoft */
     {
@@ -342,6 +348,9 @@
     },
     {
         "WIN1250", PG_WIN1250
+    },
+    {
+        "WIN1250", PG_WIN1252
     },
     {
         "SJIS", PG_SJIS


Index: src/backend/utils/mb/wchar.c
===================================================================
RCS file: 
Y:\CVS_Repositories\postgres.org/postgresql-8.0.0beta5/src/backend/utils/mb/wchar.c,v
retrieving revision 1.1
diff -u -r1.1 wchar.c
--- src/backend/utils/mb/wchar.c    30 Nov 2004 00:52:08 -0000    1.1
+++ src/backend/utils/mb/wchar.c    31 Oct 2004 19:25:30 -0000
@@ -1,7 +1,7 @@
 /*
  * conversion functions between pg_wchar and multibyte streams.
  * Tatsuo Ishii
- * $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.38 2004/09/17 
21:59:57 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.39 2004/10/31 
21:59:57 petere Exp $
  *
  * WIN1250 client encoding updated by Pavel Behal
  *
@@ -744,11 +744,12 @@
     {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},    /* 28; PG_WIN1250 */
-    {0, pg_sjis_mblen, pg_sjis_dsplen, 2},        /* 29; PG_SJIS */
-    {0, pg_big5_mblen, pg_big5_dsplen, 2},        /* 30; PG_BIG5 */
-    {0, pg_gbk_mblen, pg_gbk_dsplen, 2},        /* 31; PG_GBK */
-    {0, pg_uhc_mblen, pg_uhc_dsplen, 2},        /* 32; PG_UHC */
-    {0, pg_gb18030_mblen, pg_gb18030_dsplen, 2} /* 33; PG_GB18030 */
+    {pg_latin12wchar_with_len, pg_latin1_mblen, pg_latin1_dsplen, 
1},    /* 29; PG_WIN1252 */
+    {0, pg_sjis_mblen, pg_sjis_dsplen, 2},        /* 30; PG_SJIS */
+    {0, pg_big5_mblen, pg_big5_dsplen, 2},        /* 31; PG_BIG5 */
+    {0, pg_gbk_mblen, pg_gbk_dsplen, 2},        /* 32; PG_GBK */
+    {0, pg_uhc_mblen, pg_uhc_dsplen, 2},        /* 33; PG_UHC */
+    {0, pg_gb18030_mblen, pg_gb18030_dsplen, 2} /* 34; PG_GB18030 */
 };
 
 /* returns the byte length of a word for mule internal code */


Index: src/backend/utils/mb/conversion_procs/Makefile
===================================================================
RCS file: 
Y:\CVS_Repositories\postgres.org/postgresql-8.0.0beta5/src/backend/utils/mb/conversion_procs/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- src/backend/utils/mb/conversion_procs/Makefile    30 Nov 2004 
00:54:21 -0000    1.1
+++ src/backend/utils/mb/conversion_procs/Makefile    31 Oct 2004 
18:50:44 -0000
@@ -4,7 +4,7 @@
 #    Makefile for utils/mb/conversion_procs
 #
 # IDENTIFICATION
-#    $PostgreSQL: 
pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.11 2004/01/21 
19:22:19 tgl Exp $
+#    $PostgreSQL: 
pgsql/src/backend/utils/mb/conversion_procs/Makefile,v 1.12 2004/10/31 
19:22:19 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -23,7 +23,7 @@
     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_tcvn utf8_and_uhc utf8_and_win1250 
utf8_and_win1252 \
     utf8_and_win1256 utf8_and_win874
 
 # conversion_name source_encoding destination_encoding function object
@@ -138,6 +138,8 @@
         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_1252  UNICODE WIN1252 utf_to_win1252 
utf8_and_win1252 \
+        windows_1252_to_utf_8  WIN1250 UNICODE win1252_to_utf 
utf8_and_win1252 \
         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 \


Index: src/backend/utils/mb/conversion_procs/utf8_and_win1252
===================================================================
++ new directory


Index: 
src/backend/utils/mb/conversion_procs/utf8_and_win1252/utf8_and_win1252.c
===================================================================
++ new file


Index: src/backend/utils/mb/conversion_procs/utf8_and_win1252/Makefile
===================================================================
++ new file


Index: src/backend/utils/mb/Unicode/utf8_to_win1252.map
===================================================================
++ new file


Index: src/backend/utils/mb/Unicode/win1252_to_utf8.map
===================================================================
++ new file



With best regards,

Roland.


In response to

Responses

pgsql-patches by date

Next:From: Kris JurkaDate: 2004-11-30 01:36:42
Subject: Re: multiline CSV fields
Previous:From: Tom LaneDate: 2004-11-30 00:14:01
Subject: Preliminary patch for on-the-fly relpages/reltuples estimation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group