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

Commitbf737b8

Browse files
author
Barry Lind
committed
Updated the list of encodings supported to match what the backend now supports
1 parentf50793c commitbf737b8

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

‎src/interfaces/jdbc/org/postgresql/core/Encoding.java

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Converts to and from the character encoding used by the backend.
1010
*
11-
* $Id: Encoding.java,v 1.1 2001/07/21 18:52:11 momjian Exp $
11+
* $Id: Encoding.java,v 1.2 2001/10/16 20:07:17 barry Exp $
1212
*/
1313

1414
publicclassEncoding {
@@ -21,27 +21,40 @@ public class Encoding {
2121
privatestaticfinalHashtableencodings =newHashtable();
2222

2323
static {
24+
//Note: this list should match the set of supported server
25+
// encodings found in backend/util/mb/encnames.c
2426
encodings.put("SQL_ASCII",newString[] {"ASCII","us-ascii" });
2527
encodings.put("UNICODE",newString[] {"UTF-8","UTF8" });
2628
encodings.put("LATIN1",newString[] {"ISO8859_1" });
2729
encodings.put("LATIN2",newString[] {"ISO8859_2" });
2830
encodings.put("LATIN3",newString[] {"ISO8859_3" });
2931
encodings.put("LATIN4",newString[] {"ISO8859_4" });
30-
encodings.put("LATIN5",newString[] {"ISO8859_5" });
31-
encodings.put("LATIN6",newString[] {"ISO8859_6" });
32-
encodings.put("LATIN7",newString[] {"ISO8859_7" });
33-
encodings.put("LATIN8",newString[] {"ISO8859_8" });
34-
encodings.put("LATIN9",newString[] {"ISO8859_9" });
32+
encodings.put("ISO_8859_5",newString[] {"ISO8859_5" });
33+
encodings.put("ISO_8859_6",newString[] {"ISO8859_6" });
34+
encodings.put("ISO_8859_7",newString[] {"ISO8859_7" });
35+
encodings.put("ISO_8859_8",newString[] {"ISO8859_8" });
36+
encodings.put("LATIN5",newString[] {"ISO8859_9" });
37+
encodings.put("LATIN7",newString[] {"ISO8859_13" });
38+
encodings.put("LATIN9",newString[] {"ISO8859_15_FDIS" });
3539
encodings.put("EUC_JP",newString[] {"EUC_JP" });
3640
encodings.put("EUC_CN",newString[] {"EUC_CN" });
3741
encodings.put("EUC_KR",newString[] {"EUC_KR" });
3842
encodings.put("EUC_TW",newString[] {"EUC_TW" });
39-
encodings.put("WIN",newString[] {"Cp1252" });
43+
encodings.put("SJIS",newString[] {"SJIS" });
44+
encodings.put("BIG5",newString[] {"Big5" });
45+
encodings.put("WIN1250",newString[] {"Cp1250" });
46+
encodings.put("WIN",newString[] {"Cp1251" });
47+
encodings.put("ALT",newString[] {"Cp866" });
4048
// We prefer KOI8-U, since it is a superset of KOI8-R.
4149
encodings.put("KOI8",newString[] {"KOI8_U","KOI8_R" });
4250
// If the database isn't encoding-aware then we can't have
4351
// any preferred encodings.
4452
encodings.put("UNKNOWN",newString[0]);
53+
// The following encodings do not have a java equivalent
54+
encodings.put("MULE_INTERNAL",newString[0]);
55+
encodings.put("LATIN6",newString[0]);
56+
encodings.put("LATIN8",newString[0]);
57+
encodings.put("LATIN10",newString[0]);
4558
}
4659

4760
privatefinalStringencoding;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp