title: Support for UTF-8 encoded string in TRestClient Delphi XE5
body: <p>I want to send tweets using the new TRest components in Delphi XE5. I am looking for a way to UTF8 encode my tweet which contains IS0-8859-1 characters. The code below works, but involves codepage conversion etc. Is the a better way? Anyone?</p>
  
  <pre><code>procedure TTwitterApi.Send(Tweet: string);
  begin
    Reset;
  
    // Encode as UTF8 within (UTF-16 Delphi) string
    Tweet := EncodeAsUTF8(Tweet);
  
    FRestRequest.Resource := '1.1/statuses/update.json';
    FRestRequest.Method := rmPOST;
    FRestRequest.Params.AddItem('status', Tweet, pkGETorPOST);
    FRestRequest.Execute;
  end;
  
  
  function TTwitterApi.EncodeAsUTF8(UnicodeStr: string): string;
  var
    UTF8Str: AnsiString;
    TempStr: RawByteString;
  begin
    TempStr := UTF8Encode(UnicodeStr);
    SetLength(UTF8Str, Length(TempStr));
    Move(TempStr[1], UTF8Str[1], Length(UTF8Str));
    Result := UTF8Str;
  end;
  </code></pre>