Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email sent to Chinese, there is a problem with garbled code #7400

Closed
thisID opened this issue Jun 22, 2020 · 16 comments
Closed

Email sent to Chinese, there is a problem with garbled code #7400

thisID opened this issue Jun 22, 2020 · 16 comments

Comments

@thisID
Copy link

thisID commented Jun 22, 2020

ISSUE TYPE
  • Feature Idea
SUMMARY

Where should I set it to display Chinese properly

Project Update #744 had status successful, view details at https://towerhost/#/jobs/project/744

{
    "id": 744,
    "name": "\u6279\u91cf\u5b89\u88c5jdk\u9879\u76ee-test3",
"url": "https://towerhost/#/jobs/project/744",
    "created_by": "None",
    "started": "2020-06-22T02:49:31.785910+00:00",
    "finished": "2020-06-22T02:49:36.336942+00:00",
    "status": "successful",
    "traceback": ""
}

@ryanpetrello
Copy link
Contributor

批量安装jdk项目

@ryanpetrello
Copy link
Contributor

@thisID good find - mind giving this PR a try?

#8313

@thisID
Copy link
Author

thisID commented Oct 15, 2020

@thisID很好找到-介意尝试此PR吗?

#8313

Thank you very much. The method you provided is ok.

@wenottingham
Copy link
Contributor

Thanks for the verification!

@unlikelyzero
Copy link

Set notification body to {"body": "很好找到-介意尝试此PR吗"}

Received webhook:
{"body": "\u5f88\u597d\u627e\u5230-\u4ecb\u610f\u5c1d\u8bd5\u6b64PR\u5417"}

@ryanpetrello
Copy link
Contributor

I'll take a look at this.

@ryanpetrello
Copy link
Contributor

@unlikelyzero I'm having trouble reproducing this:

image

image

image

Can you give instructions or a test that shows it not working? Thanks.

@ryanpetrello
Copy link
Contributor

(trying with an actual email server)

@ryanpetrello
Copy link
Contributor

@unlikelyzero it looks like it worked fine to me:

~ curl -s "https://mailtrap.io/api/v1/inboxes/REDACTED/messages/" -H "Api-Token: REDACTED" | jq | grep -B10 "rpetrell"
[
  {
    "id": 1923361532,
    "subject": "很好找到-介意尝试此PR吗",
    "sent_at": "2020-10-28T16:39:49.000Z",
~ curl -s "https://mailtrap.io/api/v1/inboxes/REDACTED/messages/REDACTED/body.txt" -H "Api-Token: REDACTED"
很好找到-介意尝试此PR吗

@unlikelyzero
Copy link

@ryanpetrello tried with webhook on webhook.site. It's possible that:

  1. This fix does not apply to webhooks
  2. This webhook testing site cannot handle chinese characters

@unlikelyzero
Copy link

unlikelyzero commented Oct 28, 2020

wait, are you sending chinese characters without the json "body" in the message?

I'm sending "{"body": "很好找到-介意尝试此PR吗"}"

@ryanpetrello
Copy link
Contributor

This looks like the Python requests library we use for web hooks is converting the characters to unicode code points.

@ryanpetrello
Copy link
Contributor

ryanpetrello commented Oct 28, 2020

image

@unlikelyzero
Copy link

unlikelyzero commented Oct 28, 2020

@ryanpetrello ok so close this and reopen another for webhooks for release.next?

@ryanpetrello
Copy link
Contributor

ryanpetrello commented Oct 28, 2020

Okay @unlikelyzero this is ready for another look for the webhooks case.

@unlikelyzero
Copy link

asdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants