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

[Bug]: Docker image generate with GraalVM native executable does not support UTF-8 encoding #43705

Open
ayeshLK opened this issue Dec 12, 2024 · 0 comments
Assignees
Labels
needTriage The issue has to be inspected and labeled manually Priority/High Type/Bug userCategory/Compilation

Comments

@ayeshLK
Copy link
Member

ayeshLK commented Dec 12, 2024

Description

$subject

Steps to Reproduce

  1. Create a new Ballerina project (using Ballerina service template).
import ballerina/http;
import ballerina/log;

service /webhook on new http:Listener(9090) {
    resource function post .(http:Request req) returns http:Ok|error {
        string requestPayload = check req.getTextPayload();
        log:printInfo("Received request payload", payload = requestPayload);
        return http:OK;
    }
}
  1. Build the docker container using the following command.
    bal build --graalvm --cloud=docker
  1. Run the docker container.
    docker run -d -p 9090:9090 sample/service:v1
  1. Use the attached JSON payload [1] and send a request to the API.
    curl -H "Content-Type: application/json" --data @invoice-paid-event-data.json -k http://localhost:9090/webhook
  1. The received request payload will have encoding issues for special characters (× converted into ??)

[1] - https://drive.google.com/file/d/1dhyeWTmlQpNhdEJFoeiUTlz0R7JdER15/view?usp=sharing

Affected Version(s)

Ballerina 2201.8.x unto Ballerina 2201.10.x

Note: This is only affecting the Ballerina distributions depending on Java 17

OS, DB, other environment details and versions

No response

Related area

-> Compilation

Related issue(s) (optional)

No response

Suggested label(s) (optional)

No response

Suggested assignee(s) (optional)

No response

@ballerina-bot ballerina-bot added needTriage The issue has to be inspected and labeled manually userCategory/Compilation labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needTriage The issue has to be inspected and labeled manually Priority/High Type/Bug userCategory/Compilation
Projects
None yet
Development

No branches or pull requests

5 participants