anchor.diff:  
     case CNState1 of
       CNSTATE_ASCII:
  -      case c1 of
  -        $00..$7F:
  +    begin
  +      Result := ASCIIDecodeChar(c1);
  +      case Result of
  +        #$000A, #$000D:
           begin
  -          Result := TBuffChar(c1);
  -          case Result of
  -            #$000A, #$000D:
  -            begin
  -              CNState2 := CNSTATE2_NONE;
  -              CNState3 := CNSTATE3_NONE;
  -            end;
  -          end;
  -        end;
  -      else
  -        Result := TBuffChar(#$FFFD);
  -      end;
  +          CNState2 := CNSTATE2_NONE;
  +          CNState3 := CNSTATE3_NONE;
  +        end;
  +      end;
  +    end;
   
       CNSTATE_TWOBYTE:
       begin
         c2 := GetNext;
         case CNState2 of
  -        STATE2_DESIGNATED_GB2312: Result := GB2312DecodeChar(c1, c2);
  -
  -        STATE2_DESIGNATED_CNS11643_1: //Result := CNS11643_1DecodeChar(c1, c2);
  -          case c1 of
  -            $21..$27, $42, $44..$7D:
  -            begin
  -              case c2 of
  -                $21..$7E:
  -                begin
  -                  i := 94 * (Ord(c1) - $21) + (Ord(c2) - $21);
  -                  case i of
  -                       0.. 499: Result := CNS11643_1_1Map[i];
  -                     571:       Result := TBuffChar($4EA0);
  -                     578:       Result := TBuffChar($51AB);
  -                     583:       Result := TBuffChar($52F9);
  -                    3102..3134: Result := CNS11643_1_2Map[i - 3102];
  -                    3290..8690: Result := CNS11643_1_3Map[i - 3290];
  -                  else
  -                    Result := TBuffChar(#$FFFD);
  -                  end;
  -                end;
  -              else
  -                Result := TBuffChar(#$FFFD);
  -              end;
  -            end;
  -          else
  -            Result := TBuffChar(#$FFFD);
  -          end;
  +        STATE2_DESIGNATED_GB2312:     Result := GB2312DecodeChar(c1, c2);
  +        STATE2_DESIGNATED_CNS11643_1: Result := CNS11643_1DecodeChar(c1, c2);
         else
           Result := TBuffChar(#$FFFD);
         end;
  
positive.code:   ( CodePage:      50937; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'EBCDIC US-Canada and Traditional Chinese'),
    ( CodePage:      50939; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'EBCDIC Japanese (Latin) Extended and Japanese'),
    ( CodePage:      51932; CharSet: SHIFTJIS_CHARSET;    Converter: TBuffConvEUC_JP;      Name: 'EUC Japanese'),
    ( CodePage:      51936; CharSet: GB2312_CHARSET;      Converter: TBuffConvEUC_CN_GB;   Name: 'EUC Simplified Chinese; Chinese Simplified (EUC)'),
    ( CodePage:      51949; CharSet: HANGEUL_CHARSET;     Converter: TBuffConvEUC_KR;      Name: 'EUC Korean'),
    ( CodePage:      51950; CharSet: CHINESEBIG5_CHARSET; Converter: TBuffConvBig5CP950;   Name: 'EUC Traditional Chinese'),
    ( CodePage:      52936; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'HZ-GB2312 Simplified Chinese; Chinese Simplified (HZ)'),
    ( CodePage:      54936; CharSet: UNKNOWN_CHARSET;     Converter: TBuffConvSingleByte;  Name: 'Windows XP and later: GB18030 Simplified Chinese (4 byte); Chinese Simplified (GB18030)'),
  
negative.code: 
                  STATE3_DESIGNATED_CNS11643_2:
                  begin
                    // do not use both GetNexts as parameters. You don't know which parameter is processed first!
                    c2 := GetNext;
                    Result := CNS11643_2DecodeChar(c2, GetNext);
                    Exit;
                  end;
  
  