Skip to content

Unicode text not properly rendered via ResourceHandler #689

@jankurianski

Description

@jankurianski

I've found that ResourceHandler.FromString() mangles Chinese characters in the rendered web page.

To reproduce, in WinForms.Example.BrowserTabUserControl, modify the LoadUrl function to the following:

        private void LoadUrl(string url)
        {
            Browser.LoadHtml("<html><body>整体满意度</body></html>", "http://www.google.com/");
        }

Then, start the WinForms example and click the Go button. The web page looks like this:

CefSharp Chinese text corrupted

This looks to be a bit of a complicated topic, as CEF has its own string type, storing string data in UTF-16 and CefSharp is storing the string data in a UTF-8 encoding.

Any idea of what's going on or the areas of code that I could look into?

Oddly, the old CEF-based LoadHtml() didn't have a problem with similar Chinese text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions