anchor.diff:    ( CodePage:      21025; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'IBM EBCDIC Cyrillic Serbian-Bulgarian'),
     ( CodePage:      21027; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: '(deprecated)'),
     ( CodePage:      21866; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'Ukrainian (KOI8-U); Cyrillic (KOI8-U)'),
  -  ( CodePage:      28591; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-1 Latin 1; Western European (ISO)'),
  -  ( CodePage:      28592; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-2 Central European; Central European (ISO)'),
  -  ( CodePage:      28593; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-3 Latin 3'),
  -  ( CodePage:      28594; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-4 Baltic'),
  +  ( CodePage:      28591; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConverter;       Name: 'ISO 8859-1 Latin 1; Western European (ISO)'),
  +  ( CodePage:      28592; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-2 Latin 2; Central European; Central European (ISO)'),
  +  ( CodePage:      28593; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-3 Latin 3; Southern European'),
  +  ( CodePage:      28594; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-4 Latin 4; Northern European'),
     ( CodePage:      28595; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-5 Cyrillic'),
     ( CodePage:      28596; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-6 Arabic'),
     ( CodePage:      28597; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-7 Greek'),
     ( CodePage:      28598; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-8 Hebrew; Hebrew (ISO-Visual)'),
     ( CodePage:      28599; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-9 Turkish'),
  -  ( CodePage:      28600; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-10 ??? CP 28600'),
  -  ( CodePage:      28601; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-11 ??? CP 28601'),
  -  ( CodePage:      28602; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-12 ??? CP 28602'),
  -  ( CodePage:      28603; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-13 Estonian'),
  -  ( CodePage:      28604; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-14 ??? CP 28604'),
  -  ( CodePage:      28605; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-15 Latin 9'),
  -  ( CodePage:      28606; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-16 ??? CP 28606'),
  +  ( CodePage:      28600; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-10 Latin 6; Nordic'),
  +  ( CodePage:      28601; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-11 Thai'),
  +//( CodePage:      28602; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-12 ??? CP 28602'),
  +  ( CodePage:      28603; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-13 Latin 7; Baltic'),
  +  ( CodePage:      28604; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-14 Latin 8; Celtic'),
  +  ( CodePage:      28605; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-15 Latin 9; Western European'),
  +  ( CodePage:      28606; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvIsoMap;      Name: 'ISO 8859-16 Latin 10; South Eastern European'),
     ( CodePage:      29001; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'Europa 3'),
     ( CodePage:      38598; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 8859-8 Hebrew; Hebrew (ISO-Logical)'),
     ( CodePage:      50220; CharSet: SHIFTJIS_CHARSET;    Converter: TBuffConvISO2022JP;   Name: 'ISO 2022 Japanese with no halfwidth Katakana; Japanese (JIS)'),
     ( CodePage:      50221; CharSet: SHIFTJIS_CHARSET;    Converter: TBuffConvISO2022JP;   Name: 'ISO 2022 Japanese with halfwidth Katakana; Japanese (JIS-Allow 1 byte Kana)'),
     ( CodePage:      50222; CharSet: SHIFTJIS_CHARSET;    Converter: TBuffConvISO2022JP;   Name: 'ISO 2022 Japanese JIS X 0201-1989; Japanese (JIS-Allow 1 byte Kana - SO/SI)'),
  -  ( CodePage:      50225; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 2022 Korean'),
  -  ( CodePage:      50227; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 2022 Simplified Chinese; Chinese Simplified (ISO 2022)'),
  -  ( CodePage:      50229; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'ISO 2022 Traditional Chinese'),
  +  ( CodePage:      50225; CharSet: HANGEUL_CHARSET;     Converter: TBuffConvISO2022KR;   Name: 'ISO 2022 Korean'),
  +  ( CodePage:      50227; CharSet: GB2312_CHARSET;      Converter: TBuffConvISO2022CN;   Name: 'ISO 2022 Simplified Chinese; Chinese Simplified (ISO 2022)'),
  +  ( CodePage:      50229; CharSet: CHINESEBIG5_CHARSET; Converter: TBuffConvSingleByte;  Name: 'ISO 2022 Traditional Chinese'),
     ( CodePage:      50930; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'EBCDIC Japanese (Katakana) Extended'),
     ( CodePage:      50931; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'EBCDIC US-Canada and Japanese'),
     ( CodePage:      50933; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'EBCDIC Korean Extended and Korean'),
  
positive.code: var
    i: Integer;
  begin
    Result := #$0;
    case c1 of
      $22, $26..$27, $29..$2B, $30..$6D:
        case c2 of
  
negative.code:     function NextChar: TBuffChar; override;
    end;
  
    TBuffConvISO2022CN = class(TBuffConvEastAsia)
    private
      CNState1: (CNSTATE_ASCII, CNSTATE_TWOBYTE);
      CNState2: (CNSTATE2_NONE, STATE2_DESIGNATED_GB2312, STATE2_DESIGNATED_CNS11643_1);
      CNState3: (CNSTATE3_NONE, STATE3_DESIGNATED_CNS11643_2);
    protected
      procedure Assign(Source: TBuffConverter); override;
    public
      function NextChar: TBuffChar; override;
    end;
  
    TBuffConvISO2022KR = class(TBuffConvEastAsia)
      KRState1: (KRSTATE_ASCII, KRSTATE_TWOBYTE);
      KRState2: (KRSTATE2_NONE, STATE2_DESIGNATED_KSC5601);
    protected
      procedure Assign(Source: TBuffConverter); override;
    public
      function NextChar: TBuffChar; override;
    end;
  
  
  // CodePages (most names taken from http://msdn.microsoft.com/en-us/library/windows/desktop/dd317756%28v=vs.85%29.aspx):
  const CodePageInfos: array [0..161] of TBuffConvInfo = (
    // first entry must be code page CP_UNKNOWN!!!
    ( CodePage: CP_UNKNOWN; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'Unknown'),
    ( CodePage:     CP_ACP; CharSet: DEFAULT_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'Default ANSI CP'),
  