Skip to content

There is no way to specify the charset of a response #21

@jalberto-ghub

Description

@jalberto-ghub

Using latest version: 0.2.1

Do you want to request a feature or report a bug?
This should really be a bug, but may be thought of as a feature.
What is the current behavior?
response.send(String s) always uses the default charset s.getBytes()
If the current behavior is a bug, please provide the steps to reproduce.
Specify response.setContentType("text/plain; charset=UTF-8");
What is the expected behavior?
That the String is sent using UTF-8 encoding, but the string is sent using the default charset of the javaVM
Please mention your java and java-express version.
0.2.1

Ideally there should be a method on the response for setting the charset and that charset then be used by send. Additionally calling response.contentType(String) should check whether a charset is specified and set it accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions