Al hacer debug, hice un ejercicio modificando el valor de "Len" por el tamaño del Stream obtenido.
Código Delphi
[-]
function TEncoding.GetString(const Bytes: TBytes; ByteIndex, ByteCount: Integer): string;
var
Len: Integer;
begin
Len := GetCharCount(Bytes, ByteIndex, ByteCount); if (ByteCount > 0) and (Len = 0) then
raise EEncodingError.CreateRes(@SNoMappingForUnicodeCharacter);
SetLength(Result, Len);
GetChars(@Bytes[ByteIndex], ByteCount, PChar(Result), Len);
end;
Al hacer esto funciona correctamente. Al parecer es el charset que acepta pero estos están establecidos como
UTF-8, *;q=0.5 y el encoding en
deflate, gzip, *;q=0
Sigo sin saber como solventar este error.