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

Character encoding in CefResourceHandler #461

Open
aalku opened this issue Jan 13, 2024 · 2 comments
Open

Character encoding in CefResourceHandler #461

aalku opened this issue Jan 13, 2024 · 2 comments
Labels
enhancement Enhancement request

Comments

@aalku
Copy link

aalku commented Jan 13, 2024

Is your feature request related to a problem? Please describe.
I'm making a CefResourceHandler to display internal resources instead of actual http(s) resources and I can't set the character encoding in the response.

Describe the solution you'd like
I want to set the charset of CefResponse. I see it's in the C++ class.
https://github.com/chromiumembedded/cef/blob/0d50d5a8c606ab5481c2969f1236d266bd416f31/include/cef_response.h#L124C24-L124C24

Describe alternatives you've considered
In the case of html I'm adding an equivalent tag but I think that's not possible in json or js, etc.
The tag is <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
As an alternative I could generate the response in the charset encoding that the chromium is using but I don't know if thats defined or system dependant.

Additional context
I want to use URL like internal:index.html and that the content is internally provided. All I'm missing is the encoding right now.

Thanks!

@aalku aalku added the enhancement Enhancement request label Jan 13, 2024
@aalku
Copy link
Author

aalku commented Jan 14, 2024

I made this changes. I'm not sure if they are fine or they are enough.
master...aalku:java-cef:master

I'll try to make a build and test them but I don't know if I will be able to.

@aalku
Copy link
Author

aalku commented Jan 16, 2024

Hi. I found it really hard to build jcefmaven with this changes but I finally got it and tested it and it works. 🥳

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

No branches or pull requests

1 participant