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:     begin
        c2 := GetNext;
        case c2 of
          $40..$7E:
            Result := TBuffChar($E000 + 188 * (c1 - $F0) + (c2 - $40));
  
          $80..$FC:
            Result := TBuffChar($E000 + 188 * (c1 - $F0) + (c2 - $41));
        end;
      end;
    end;
  end;
  
  { TBuffConvEastAsia }
  
  //-- BG ---------------------------------------------------------- 02.10.2012 --
  function TBuffConvEastAsia.GB2312DecodeChar(c1, c2: Byte): TBuffChar;
  var
    i: Integer;
  begin
    case c1 of
      $21..$29, $30..$77:
        case c2 of
          $21..$7E:
          begin
            i := 94 * (c1 - $21) + (c2 - $21);
            case i of
                 0.. 830: Result := GB2312_1Map[i];
              1410..8177: Result := GB2312_2Map[i - 1410];
            else
              Result := TBuffChar($0);
            end;
          end;
        else
          Result := TBuffChar($0);
        end;
    else
      Result := TBuffChar($0);
    end;
  end;
  
  //-- BG ---------------------------------------------------------- 04.10.2012 --
  function TBuffConvEastAsia.JIS_X0201DecodeChar(c1: Byte): TBuffChar;
  begin
    case c1 of
      $5C: Result := #$00A5;
      $7E: Result := #$203E;
      $A1..$DF: Result := TBuffChar(c1 + $FEC0);
    else
      Result := TBuffChar($FFFD);
    end;
  end;
  
  //-- BG ---------------------------------------------------------- 04.10.2012 --
  function TBuffConvEastAsia.JIS_X0208DecodeChar(c1, c2: Byte): TBuffChar;
  var
    i: Integer;
  begin
    case c1 of
      $21..$27, $30..$73:
        case c2 of
          $21..$7E:
          begin
            i := 94 * (c1 - $21) + (c2 - $21);
            case i of
                 0.. 689: Result := JIS_X0208_1Map[i];
              1410..7807: Result := JIS_X0208_2Map[i - 1410];
            else
              Result := TBuffChar($FFFD);
            end;
          end;
        else
          Result := TBuffChar($FFFD);
        end;
    else
      Result := TBuffChar($FFFD);
    end;
  end;
  
  //-- BG ---------------------------------------------------------- 04.10.2012 --
  function TBuffConvEastAsia.JIS_X0212DecodeChar(c1, c2: Byte): TBuffChar;
  var
    i: Integer;
  begin
    case c1 of
      $22, $26..$27, $29..$2B, $30..$6D:
        case c2 of
          $21..$7E:
          begin
            i := 94 * (c1 - $21) + (c2 - $21);
            case i of
                 0.. 174: Result := JIS_X0212_1Map[i - 94];
               470.. 657: Result := JIS_X0212_2Map[i - 470];
               752..1026: Result := JIS_X0212_3Map[i - 752];
              1410..7210: Result := JIS_X0212_4Map[i - 1410];
            else
              Result := TBuffChar($FFFD);
            end;
          end;
        else
          Result := TBuffChar($FFFD);
        end;
    else
      Result := TBuffChar($FFFD);
    end;
  end;
  
  //-- BG ---------------------------------------------------------- 02.10.2012 --
  function TBuffConvEastAsia.KSC5601DecodeChar(c1, c2: Byte): TBuffChar;
  var
    i: Integer;
  begin
    Result := #$0;
    case c1 of
      $21..$2C, $30..$48, $4A..$7D:
        case c2 of
          $21..$7E:
          begin
            i := 94 * (c1 - $21) + (c2 - $21);
            case i of
                 0..1114: Result := KSC5601_1Map[i];
              1410..3759: Result := KSC5601_2Map[i - 1410];
              3854..8741: Result := KSC5601_3Map[i - 3854];
            end;
          end;
        end;
    end;
  end;
  
  { TBuffConvEUC }
  
  //-- BG ---------------------------------------------------------- 02.10.2012 --
  function TBuffConvEUC.NextChar: TBuffChar;
  var
    c1, c2: Cardinal;
  begin
    c1 := Ord(FPos.AnsiChr[0]);
    Result := TBuffChar(c1);
    Inc(FPos.AnsiChr, 1);
    case c1 of
      0:
      begin
        Dec(FPos.AnsiChr, 1);
        Result := #$0;
      end;
  
      $01..$80: ;
        // done above: Result := TBuffChar(c1);
  
      $A1..$FE:
      begin
        c2 := Ord(FPos.AnsiChr[0]);
        if c2 = 0 then
          Exit;
        Inc(FPos.AnsiChr, 1);
        Result := TwoByteDecoder(c1 - $80, c2 - $80);
      end;
    end;
  end;
  
  { TBuffConvEUC_CN_GB }
  
  //-- BG ---------------------------------------------------------- 02.10.2012 --
  function TBuffConvEUC_CN_GB.TwoByteDecoder(c1, c2: Byte): TBuffChar;
  begin
    Result := GB2312DecodeChar(c1, c2);
  end;
  
  { TBuffConvEUC_KR }
  
  //-- BG ---------------------------------------------------------- 02.10.2012 --
  function TBuffConvEUC_KR.TwoByteDecoder(c1, c2: Byte): TBuffChar;
  begin
    Result := KSC5601DecodeChar(c1, c2);
  end;
  
  { TBuffConvIBM936 }
  
negative.code:         $61..$7A: Result := UHC2Decode(c1 - $A1, c2 - $47);
          $81..$A0: Result := UHC2Decode(c1 - $A1, c2 - $4D);
  
          $A1..$E7,
          $E9..$FE: Result := KSC5601Decode(c1, c2);
  
          $E8:
            if c1 <> $A2 then
  