HybridWebView don't display utf-8 charset.

HybridWebView don't display utf-8 charset (Russian language in my case), but WebView from Xamarin.Forms.WebView successfully do it.

Steps to reproduce

  1. Create HybribWebView with null JsonSerializer.
    HybridWebView hybridView = new HybridWebView(null);
  2. Create and set WebViewSource.
    string html = "<!DOCTYPE html<html lang='ru' dir='ltr' id='html'>

Привет мир

";

    WebViewSource webViewSource = new HtmlWebViewSource
    {
    Html = html
    };

    hybridView.Source = webViewSource;
  1. Set this hybridView as a content of the ContentPage

this.Content = hybridView;

Answers

  • IliaValchenkoIliaValchenko USMember ✭✭

    You can use this html string as an example.
    string html = "<!DOCTYPE html<html lang='ru' dir='ltr' id='html'><head><meta charset='utf-8'></head><body><p>Привет мир</p></body></html>";

  • syntaxsyntax Member ✭✭

    did you find any solution @IliaValchenko ?

Sign In or Register to comment.