Cannot receive contentType "application/pdf" using RestResponse
<p>My application sends data(personal info) using "application/json". If data is valid, then, server sends me back a PDF File through "application/pdf". But when RestResponse arrives, an exception pops out: "No mapping for the unicode character exists in the target multibyte code page". I don't know whats happening. I'm working on this in the past 4 days and I can't fix this. Exception pops out at line: "RRequest.Execute;". Here's my code guys:</p>

<pre><code>procedure TThreadBoleto.Execute;
var
  RCtx : TRttiContext;
  RType : TRttiType;
  RProp : TRttiProperty;
  I : integer;
  PDF : TFile;
begin
  try
    try
      RClient := TRESTClient.Create('');
      with RClient do begin
        AcceptEncoding := 'identity';
        FallbackCharsetEncoding := 'UTF-8';
        Accept := 'application/json;text/plain;application/pdf;';
        AcceptCharset := 'UTF-8';
        BaseURL := 'https://sandbox.boletocloud.com/api/v1/boletos';
        ContentType := 'application/x-www-form-urlencoded';
        HandleRedirects := true;

        RCtx := TRttiContext.Create;
        RType := RCtx.GetType(THRBoleto.ClassType);
        I := 0;
        for RProp in RType.GetProperties do
        begin
          Params.AddItem;
          Params.Items[I].name := LowerCase(RProp.Name.Replace('_','.'));
          Params.Items[I].Value := RProp.GetValue(THRBoleto).AsString;
          I := I + 1;
        end;
      end;

      RRequest := TRESTRequest.Create(RRequest);
      with RRequest do begin
        Accept := 'application/json;text/plain;application/pdf;';
        Client := RClient;
        Method := rmPost;
        SynchronizedEvents := false;
        AcceptCharset := 'UTF-8';
      end;

      RResponse := TRESTResponse.Create(RResponse);
      RResponse.ContentType := 'application/pdf;*/*;';
      RResponse.ContentEncoding := 'UTF-8';

      RAuth := THTTPBasicAuthenticator.Create('','');
      with RAuth do begin
        Username := 'anAPItokenAccess';
        Password := 'token';
      end;

      RClient.Authenticator := RAuth;
      RRequest.Response := RResponse;

      RRequest.Execute;
      PDF.WriteAllBytes(ExtractFilePath(Application.ExeName)+'boleto.pdf',RResponse.RawBytes);
      OutputStrings.Add(RResponse.Content);
      OutputStrings.Add('');
      OutputStrings.Add('');
      OutputStrings.AddStrings(RResponse.Headers);
    except on E:Exception do
      ShowMessage('Error: '+E.Message);
    end;
  finally
  THRBoleto.Free;
  end;
end;
</code></pre>