Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit152a101

Browse files
committed
Allow WIN1250 as server encoding.
1 parent0428840 commit152a101

File tree

4 files changed

+40
-30
lines changed

4 files changed

+40
-30
lines changed

‎doc/src/sgml/charset.sgml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.44 2004/03/23 02:47:35 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/charset.sgml,v 2.45 2004/09/17 21:59:56 petere Exp $ -->
22

33
<chapter id="charset">
44
<title>Localization</>
@@ -396,14 +396,22 @@ initdb --locale=sv_SE
396396
<entry><literal>KOI8</literal></entry>
397397
<entry><acronym>KOI</acronym>8-R(U)</entry>
398398
</row>
399-
<row>
400-
<entry><literal>WIN</literal></entry>
401-
<entry>Windows CP1251</entry>
402-
</row>
403399
<row>
404400
<entry><literal>ALT</literal></entry>
405401
<entry>Windows CP866</entry>
406402
</row>
403+
<row>
404+
<entry><literal>WIN874</literal></entry>
405+
<entry>Windows CP874 (Thai)</entry>
406+
</row>
407+
<row>
408+
<entry><literal>WIN1250</literal></entry>
409+
<entry>Windows CP1250</entry>
410+
</row>
411+
<row>
412+
<entry><literal>WIN</literal></entry>
413+
<entry>Windows CP1251</entry>
414+
</row>
407415
<row>
408416
<entry><literal>WIN1256</literal></entry>
409417
<entry>Windows CP1256 (Arabic)</entry>
@@ -412,10 +420,6 @@ initdb --locale=sv_SE
412420
<entry><literal>TCVN</literal></entry>
413421
<entry><acronym>TCVN</>-5712/Windows CP1258 (Vietnamese)</entry>
414422
</row>
415-
<row>
416-
<entry><literal>WIN874</literal></entry>
417-
<entry>Windows CP874 (Thai)</entry>
418-
</row>
419423
</tbody>
420424
</tgroup>
421425
</table>
@@ -677,14 +681,26 @@ $ <userinput>psql -l</userinput>
677681
</entry>
678682
</row>
679683
<row>
680-
<entry><literal>WIN</literal></entry>
684+
<entry><literal>ALT</literal></entry>
681685
<entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>,
682686
<literal>ALT</literal>, <literal>KOI8</literal>,
683687
<literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
684688
</entry>
685689
</row>
686690
<row>
687-
<entry><literal>ALT</literal></entry>
691+
<entry><literal>WIN874</literal></entry>
692+
<entry><literal>WIN874</literal>,
693+
<literal>UNICODE</literal>
694+
</entry>
695+
</row>
696+
<row>
697+
<entry><literal>WIN1250</literal></entry>
698+
<entry><literal>LATIN2</literal>, <literal>WIN1250</literal>,
699+
<literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
700+
</entry>
701+
</row>
702+
<row>
703+
<entry><literal>WIN</literal></entry>
688704
<entry><literal>ISO_8859_5</literal>, <literal>WIN</literal>,
689705
<literal>ALT</literal>, <literal>KOI8</literal>,
690706
<literal>UNICODE</literal>, <literal>MULE_INTERNAL</literal>
@@ -702,12 +718,6 @@ $ <userinput>psql -l</userinput>
702718
<literal>UNICODE</literal>
703719
</entry>
704720
</row>
705-
<row>
706-
<entry><literal>WIN874</literal></entry>
707-
<entry><literal>WIN874</literal>,
708-
<literal>UNICODE</literal>
709-
</entry>
710-
</row>
711721
</tbody>
712722
</tgroup>
713723
</table>

‎src/backend/utils/mb/encnames.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Encoding names and routines for work with it. All
33
* in this file is shared bedween FE and BE.
44
*
5-
* $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.18 2003/11/29 22:39:59 pgsql Exp $
5+
* $PostgreSQL: pgsql/src/backend/utils/mb/encnames.c,v 1.19 2004/09/17 21:59:57 petere Exp $
66
*/
77
#ifdefFRONTEND
88
#include"postgres_fe.h"
@@ -340,6 +340,9 @@ pg_enc2name pg_enc2name_tbl[] =
340340
{
341341
"ISO_8859_8",PG_ISO_8859_8
342342
},
343+
{
344+
"WIN1250",PG_WIN1250
345+
},
343346
{
344347
"SJIS",PG_SJIS
345348
},
@@ -352,9 +355,6 @@ pg_enc2name pg_enc2name_tbl[] =
352355
{
353356
"UHC",PG_UHC
354357
},
355-
{
356-
"WIN1250",PG_WIN1250
357-
},
358358
{
359359
"GB18030",PG_GB18030
360360
}

‎src/backend/utils/mb/wchar.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* conversion functions between pg_wchar and multibyte streams.
33
* Tatsuo Ishii
4-
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.37 2004/08/29 05:06:51 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/mb/wchar.c,v 1.38 2004/09/17 21:59:57 petere Exp $
55
*
66
* WIN1250 client encoding updated by Pavel Behal
77
*
@@ -743,11 +743,11 @@ pg_wchar_tbl pg_wchar_table[] = {
743743
{pg_latin12wchar_with_len,pg_latin1_mblen,pg_latin1_dsplen,1},/* 25; ISO-8859-6 */
744744
{pg_latin12wchar_with_len,pg_latin1_mblen,pg_latin1_dsplen,1},/* 26; ISO-8859-7 */
745745
{pg_latin12wchar_with_len,pg_latin1_mblen,pg_latin1_dsplen,1},/* 27; ISO-8859-8 */
746-
{0,pg_sjis_mblen,pg_sjis_dsplen,2},/* 28;PG_SJIS */
747-
{0,pg_big5_mblen,pg_big5_dsplen,2},/* 29;PG_BIG5 */
748-
{0,pg_gbk_mblen,pg_gbk_dsplen,2},/* 30;PG_GBK */
749-
{0,pg_uhc_mblen,pg_uhc_dsplen,2},/* 31;PG_UHC */
750-
{pg_latin12wchar_with_len,pg_latin1_mblen,pg_latin1_dsplen,1},/* 32;PG_WIN1250 */
746+
{pg_latin12wchar_with_len,pg_latin1_mblen,pg_latin1_dsplen,1},/* 28;PG_WIN1250 */
747+
{0,pg_sjis_mblen,pg_sjis_dsplen,2},/* 29;PG_SJIS */
748+
{0,pg_big5_mblen,pg_big5_dsplen,2},/* 30;PG_BIG5 */
749+
{0,pg_gbk_mblen,pg_gbk_dsplen,2},/* 31;PG_GBK */
750+
{0,pg_uhc_mblen,pg_uhc_dsplen,2},/* 32;PG_UHC */
751751
{0,pg_gb18030_mblen,pg_gb18030_dsplen,2}/* 33; PG_GB18030 */
752752
};
753753

‎src/include/mb/pg_wchar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.51 2004/08/29 05:06:56 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/mb/pg_wchar.h,v 1.52 2004/09/17 21:59:57 petere Exp $ */
22

33
#ifndefPG_WCHAR_H
44
#definePG_WCHAR_H
@@ -177,19 +177,19 @@ typedef enum pg_enc
177177
PG_ISO_8859_6,/* ISO-8859-6 */
178178
PG_ISO_8859_7,/* ISO-8859-7 */
179179
PG_ISO_8859_8,/* ISO-8859-8 */
180+
PG_WIN1250,/* windows-1250 */
180181

181182
/* followings are for client encoding only */
182183
PG_SJIS,/* Shift JIS (Winindows-932) */
183184
PG_BIG5,/* Big5 (Windows-950) */
184185
PG_GBK,/* GBK (Windows-936) */
185186
PG_UHC,/* UHC (Windows-949) */
186-
PG_WIN1250,/* windows-1250 */
187187
PG_GB18030,/* GB18030 */
188188
_PG_LAST_ENCODING_/* mark only */
189189

190190
}pg_enc;
191191

192-
#definePG_ENCODING_BE_LASTPG_ISO_8859_8
192+
#definePG_ENCODING_BE_LASTPG_WIN1250
193193
#definePG_ENCODING_FE_LAST PG_GB18030
194194

195195
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp