diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-19 17:05:02 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2007-05-19 17:05:02 +0000 |
| commit | f1091ec619195a610f8b2df49cf647110ca0890e (patch) | |
| tree | 32fb88f51382ff9c950c737b1c08b8840ab09409 | |
| parent | 695a21ae7fc1d401c556988394dc672bd40a8384 (diff) | |
unicode: Fixed #4340 -- added a few character set encodings that PostgreSQL 7.x
can return. Pointed out by tim@tryphon.org.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/backends/postgresql/encodings.py | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/django/db/backends/postgresql/encodings.py b/django/db/backends/postgresql/encodings.py index ad9bf1807d..934cc6e6de 100644 --- a/django/db/backends/postgresql/encodings.py +++ b/django/db/backends/postgresql/encodings.py @@ -2,6 +2,7 @@ # doesn't exist in psycopg, so we have to maintain it by hand (using # information from section 21.2.1 in the PostgreSQL manual). ENCODING_MAP = { + "ALT": 'cp866', "BIG5": 'big5-tw', "EUC_CN": 'gb2312', "EUC_JP": 'euc_jp', @@ -26,8 +27,11 @@ ENCODING_MAP = { "LATIN9": 'iso8859_15', "SJIS": 'shift_jis', "SQL_ASCII": 'ascii', + "TCVN": 'cp1258', "UHC": 'cp949', + "UNICODE": 'utf-8', "UTF8": 'utf-8', + "WIN": 'cp1251', "WIN866": 'cp866', "WIN874": 'cp874', "WIN1250": 'cp1250', @@ -39,46 +43,6 @@ ENCODING_MAP = { # Unsupported (no equivalents in codecs module): # EUC_TW # LATIN10 + # MULE_INTERNAL } -# Mapping between PostgreSQL encodings and Python codec names. This mapping -# doesn't exist in psycopg, so we have to maintain it by hand (using -# information from section 21.2.1 in the PostgreSQL manual). -ENCODING_MAP = { - "BIG5": 'big5-tw', - "EUC_CN": 'gb2312', - "EUC_JP": 'euc_jp', - "EUC_KR": 'euc_kr', - "GB18030": 'gb18030', - "GBK": 'gbk', - "ISO_8859_5": 'iso8859_5', - "ISO_8859_6": 'iso8859_6', - "ISO_8859_7": 'iso8859_7', - "ISO_8859_8": 'iso8859_8', - "JOHAB": 'johab', - "KOI8": 'koi18_r', - "KOI18R": 'koi18_r', - "LATIN1": 'latin_1', - "LATIN2": 'iso8859_2', - "LATIN3": 'iso8859_3', - "LATIN4": 'iso8859_4', - "LATIN5": 'iso8859_9', - "LATIN6": 'iso8859_10', - "LATIN7": 'iso8859_13', - "LATIN8": 'iso8859_14', - "LATIN9": 'iso8859_15', - "SJIS": 'shift_jis', - "SQL_ASCII": 'ascii', - "UHC": 'cp949', - "UTF8": 'utf-8', - "WIN866": 'cp866', - "WIN874": 'cp874', - "WIN1250": 'cp1250', - "WIN1251": 'cp1251', - "WIN1252": 'cp1252', - "WIN1256": 'cp1256', - "WIN1258": 'cp1258', - # Unsupported (no equivalents in codecs module): - # EUC_TW - # LATIN10 -} |
