4
votes

If a user has created a draft in the gmail web UI that contains Unicode characters in the subject, calling Draft.Send seems to not handle these unicode characters correctly.

You can test this by:

  1. Create a draft in gmail with the subject "snowman ☃"
  2. Call drafts.list to get the draft id in the API explorer (https://developers.google.com/gmail/api/v1/reference/users/drafts/list#try-it)
  3. Call Drafts.send using that draft id in the api explorer (https://developers.google.com/gmail/api/v1/reference/users/drafts/send#try-it)
  4. Goto Gmail web ui, then the sent folder, and see that the email was sent with a subject of "snowman: ☃"

Any workarounds for this?

1
Have you finally found a workaround for this issue?jbescoyez

1 Answers

-1
votes

Email messages can only contain ASCII characters. See RFC 5335. Did you try encoding the subject?

Subject: =?utf-8?b?c25vd21hbiDimIM=?=

You didn't mention what language you're using but most have a library for performing the encoding.