anchor.diff:          _       -> truncate(Rest1, N-1, Append, LastState, Last, word, Acc1)
       end;
   truncate(<<C/utf8,Rest/binary>>, N, Append, LastState, Last, _AccState, Acc) ->
  -    truncate(Rest, N-1, Append, LastState, Last, in_word, <<Acc/binary,C/utf8>>).
  +    truncate(Rest, N-1, Append, LastState, Last, in_word, <<Acc/binary,C/utf8>>);
  +
  +truncate(<<_, Rest/binary>>, N, Append, LastState, Last, AccState, Acc) ->
  +    % Silently drop non-utf-8 characters
  +    truncate(Rest, N, Append, LastState, Last, AccState, Acc).
   
   
   get_entity(<<>>, Acc) ->
  
positive.code:     trim_right(<<>>, _Char, _WS, Acc) ->
          Acc.
  
  %% @doc Check if the variable is a one dimensional list of bytes, probably a string
  -spec is_string(list()) -> boolean().
  is_string([]) ->
      true;
  is_string([C|Rest]) when
  
negative.code: %% @doc Split the binary into lines. Line separators can be \r, \n or \r\n.
  split_lines(B) when is_binary(B) ->
      split_lines(B, <<>>, []).
  
      split_lines(<<>>, Line, Acc) ->
          lists:reverse([Line|Acc]);
      split_lines(<<13,10,Rest/binary>>, Line, Acc) ->
  