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

Unicode Support for execute-request #124

Closed
ystxn opened this issue Jul 5, 2022 · 0 comments · Fixed by #128
Closed

Unicode Support for execute-request #124

ystxn opened this issue Jul 5, 2022 · 0 comments · Fixed by #128
Assignees

Comments

@ystxn
Copy link
Member

ystxn commented Jul 5, 2022

Bug Report

WDK's execute-request is not unicode compatible and transforms unicode characters to question marks in the outputs object returned.

Steps to Reproduce:

id: post
activities:
  - execute-request:
      id: init
      on:
        message-received:
          content: post
      method: POST
      url: https://httpbin.org/post
      headers:
        Content-Type: multipart/form-data
      body:
        text: Hello こんにちは世界

  - execute-script:
      id: debug
      script: println init.outputs

  - send-message:
      id: sendResponse
      content: ${init.outputs.body.form.text}

Expected Result:

  1. Console will print the original text: Hello こんにちは世界
  2. Bot will send original text: Hello こんにちは世界

Actual Result:

  1. Console prints: Hello ???????
  2. Bot sends: Hello ???????

Environment:

WDK 1.1.0

symphony-soufiane added a commit to symphony-soufiane/symphony-wdk that referenced this issue Jul 18, 2022
When a body is sent with multipart-form-dara content type, we were using the default content type when adding the multipart string to the actual MultipartEntity object. This default content type is plain/text with ISO_8859_1 encoding charset. The fix was to enforce using StandarCharsets.UTF_8.
@symphony-soufiane symphony-soufiane self-assigned this Jul 18, 2022
@symphony-soufiane symphony-soufiane linked a pull request Jul 18, 2022 that will close this issue
symphony-soufiane added a commit that referenced this issue Jul 19, 2022
* #124: Unicode support for execute-request.
When a body is sent with multipart-form-dara content type, we were using the default content type when adding the multipart string to the actual MultipartEntity object. This default content type is plain/text with ISO_8859_1 encoding charset. The fix was to enforce using StandarCharsets.UTF_8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants