Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
bf737b85
Commit
bf737b85
authored
Oct 16, 2001
by
Barry Lind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the list of encodings supported to match what the backend now supports
parent
f50793c7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
src/interfaces/jdbc/org/postgresql/core/Encoding.java
src/interfaces/jdbc/org/postgresql/core/Encoding.java
+20
-7
No files found.
src/interfaces/jdbc/org/postgresql/core/Encoding.java
View file @
bf737b85
...
...
@@ -8,7 +8,7 @@ import org.postgresql.util.*;
/**
* Converts to and from the character encoding used by the backend.
*
* $Id: Encoding.java,v 1.
1 2001/07/21 18:52:11 momjian
Exp $
* $Id: Encoding.java,v 1.
2 2001/10/16 20:07:17 barry
Exp $
*/
public
class
Encoding
{
...
...
@@ -21,27 +21,40 @@ public class Encoding {
private
static
final
Hashtable
encodings
=
new
Hashtable
();
static
{
//Note: this list should match the set of supported server
// encodings found in backend/util/mb/encnames.c
encodings
.
put
(
"SQL_ASCII"
,
new
String
[]
{
"ASCII"
,
"us-ascii"
});
encodings
.
put
(
"UNICODE"
,
new
String
[]
{
"UTF-8"
,
"UTF8"
});
encodings
.
put
(
"LATIN1"
,
new
String
[]
{
"ISO8859_1"
});
encodings
.
put
(
"LATIN2"
,
new
String
[]
{
"ISO8859_2"
});
encodings
.
put
(
"LATIN3"
,
new
String
[]
{
"ISO8859_3"
});
encodings
.
put
(
"LATIN4"
,
new
String
[]
{
"ISO8859_4"
});
encodings
.
put
(
"LATIN5"
,
new
String
[]
{
"ISO8859_5"
});
encodings
.
put
(
"LATIN6"
,
new
String
[]
{
"ISO8859_6"
});
encodings
.
put
(
"LATIN7"
,
new
String
[]
{
"ISO8859_7"
});
encodings
.
put
(
"LATIN8"
,
new
String
[]
{
"ISO8859_8"
});
encodings
.
put
(
"LATIN9"
,
new
String
[]
{
"ISO8859_9"
});
encodings
.
put
(
"ISO_8859_5"
,
new
String
[]
{
"ISO8859_5"
});
encodings
.
put
(
"ISO_8859_6"
,
new
String
[]
{
"ISO8859_6"
});
encodings
.
put
(
"ISO_8859_7"
,
new
String
[]
{
"ISO8859_7"
});
encodings
.
put
(
"ISO_8859_8"
,
new
String
[]
{
"ISO8859_8"
});
encodings
.
put
(
"LATIN5"
,
new
String
[]
{
"ISO8859_9"
});
encodings
.
put
(
"LATIN7"
,
new
String
[]
{
"ISO8859_13"
});
encodings
.
put
(
"LATIN9"
,
new
String
[]
{
"ISO8859_15_FDIS"
});
encodings
.
put
(
"EUC_JP"
,
new
String
[]
{
"EUC_JP"
});
encodings
.
put
(
"EUC_CN"
,
new
String
[]
{
"EUC_CN"
});
encodings
.
put
(
"EUC_KR"
,
new
String
[]
{
"EUC_KR"
});
encodings
.
put
(
"EUC_TW"
,
new
String
[]
{
"EUC_TW"
});
encodings
.
put
(
"WIN"
,
new
String
[]
{
"Cp1252"
});
encodings
.
put
(
"SJIS"
,
new
String
[]
{
"SJIS"
});
encodings
.
put
(
"BIG5"
,
new
String
[]
{
"Big5"
});
encodings
.
put
(
"WIN1250"
,
new
String
[]
{
"Cp1250"
});
encodings
.
put
(
"WIN"
,
new
String
[]
{
"Cp1251"
});
encodings
.
put
(
"ALT"
,
new
String
[]
{
"Cp866"
});
// We prefer KOI8-U, since it is a superset of KOI8-R.
encodings
.
put
(
"KOI8"
,
new
String
[]
{
"KOI8_U"
,
"KOI8_R"
});
// If the database isn't encoding-aware then we can't have
// any preferred encodings.
encodings
.
put
(
"UNKNOWN"
,
new
String
[
0
]);
// The following encodings do not have a java equivalent
encodings
.
put
(
"MULE_INTERNAL"
,
new
String
[
0
]);
encodings
.
put
(
"LATIN6"
,
new
String
[
0
]);
encodings
.
put
(
"LATIN8"
,
new
String
[
0
]);
encodings
.
put
(
"LATIN10"
,
new
String
[
0
]);
}
private
final
String
encoding
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment