Skip to content

Multi-byte character got garbled on received mail. #6

Closed
@kikutaro

Description

@kikutaro

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. こんにちは -> ?????

capture2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: work in progressTwilio or the community is in the process of implementingtype: bugbug in the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions