Closed
Description
Issue Summary
When I was sending mail with Japanese multi-byte character via sendgrid-java v3.0.2, the received mail contents got garbled.Ex. こんにちは -> ?????
Pretty similar #4 but this is not sending but receiving.
Steps to Reproduce
Following simple code.
SendGrid sg = new SendGrid("api keys");
Request request = new Request();
Email from = new Email("from@from.co.jp");
String subject = "こんにちは";
Email to = new Email("to@to.co.jp");
Content content = new Content("text/plain", "こんにちは");
Mail mail = new Mail(from, subject, to, content);
request.method = Method.POST;
request.endpoint = "mail/send";
request.body = mail.build();
Response response = sg.api(request);
I tried curl command with multi-byte, it worked fine. The result means issue on library side.
Technical details:
- java-http-client Version: 2.3.1
- sendgrid-java Version:3.0.2
- Java Version: JDK 8u66