Django

Code

Changeset 5286

Show
Ignore:
Timestamp:
05/19/07 12:05:02 (2 years ago)
Author:
mtredinnick
Message:

unicode: Fixed #4340 -- added a few character set encodings that PostgreSQL 7.x
can return. Pointed out by tim@tryphon.org.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/unicode/django/db/backends/postgresql/encodings.py

    r4971 r5286  
    33# information from section 21.2.1 in the PostgreSQL manual). 
    44ENCODING_MAP = { 
     5    "ALT": 'cp866', 
    56    "BIG5": 'big5-tw', 
    67    "EUC_CN": 'gb2312', 
     
    2728    "SJIS": 'shift_jis', 
    2829    "SQL_ASCII": 'ascii', 
     30    "TCVN": 'cp1258', 
    2931    "UHC": 'cp949', 
     32    "UNICODE": 'utf-8', 
    3033    "UTF8": 'utf-8', 
     34    "WIN": 'cp1251', 
    3135    "WIN866": 'cp866', 
    3236    "WIN874": 'cp874', 
     
    4044    # EUC_TW 
    4145    # LATIN10 
     46    # MULE_INTERNAL 
    4247} 
    43 # Mapping between PostgreSQL encodings and Python codec names. This mapping 
    44 # doesn't exist in psycopg, so we have to maintain it by hand (using 
    45 # information from section 21.2.1 in the PostgreSQL manual). 
    46 ENCODING_MAP = { 
    47     "BIG5": 'big5-tw', 
    48     "EUC_CN": 'gb2312', 
    49     "EUC_JP": 'euc_jp', 
    50     "EUC_KR": 'euc_kr', 
    51     "GB18030": 'gb18030', 
    52     "GBK": 'gbk', 
    53     "ISO_8859_5": 'iso8859_5', 
    54     "ISO_8859_6": 'iso8859_6', 
    55     "ISO_8859_7": 'iso8859_7', 
    56     "ISO_8859_8": 'iso8859_8', 
    57     "JOHAB": 'johab', 
    58     "KOI8": 'koi18_r', 
    59     "KOI18R": 'koi18_r', 
    60     "LATIN1": 'latin_1', 
    61     "LATIN2": 'iso8859_2', 
    62     "LATIN3": 'iso8859_3', 
    63     "LATIN4": 'iso8859_4', 
    64     "LATIN5": 'iso8859_9', 
    65     "LATIN6": 'iso8859_10', 
    66     "LATIN7": 'iso8859_13', 
    67     "LATIN8": 'iso8859_14', 
    68     "LATIN9": 'iso8859_15', 
    69     "SJIS": 'shift_jis', 
    70     "SQL_ASCII": 'ascii', 
    71     "UHC": 'cp949', 
    72     "UTF8": 'utf-8', 
    73     "WIN866": 'cp866', 
    74     "WIN874": 'cp874', 
    75     "WIN1250": 'cp1250', 
    76     "WIN1251": 'cp1251', 
    77     "WIN1252": 'cp1252', 
    78     "WIN1256": 'cp1256', 
    79     "WIN1258": 'cp1258', 
    8048 
    81     # Unsupported (no equivalents in codecs module): 
    82     # EUC_TW 
    83     # LATIN10 
    84 }