From 45869969409a9fc62ee794439931e8fc33d38599 Mon Sep 17 00:00:00 2001 From: "surya.kumar7" Date: Tue, 15 May 2018 13:44:21 +0530 Subject: [PATCH] Set default encoding for WebContents as UTF-8 Currently, the default encoding being used is ISO-8859-1 which is a single-byte encoding and is capable of only supporting limited symbols. Change it to UTF-8(multi byte encoding) just like in crosswalk to extend support for more symbols Change-Id: I92e70445ca668c8db8c258e4ad1a6d41816dd2fb Signed-off-by: surya.kumar7 --- atom/browser/atom_browser_client.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index ebbd54a..9408fcf 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -54,6 +54,8 @@ bool g_suppress_renderer_process_restart = false; // Custom schemes to be registered to handle service worker. std::string g_custom_service_worker_schemes = ""; +const std::string kDefaultEncoding = "UTF-8"; + void Noop(scoped_refptr) { } @@ -161,6 +163,7 @@ void AtomBrowserClient::OverrideWebkitPrefs( prefs->allow_file_access_from_file_urls = true; prefs->experimental_webgl_enabled = true; prefs->allow_running_insecure_content = false; + prefs->default_encoding = kDefaultEncoding; // Custom preferences of guest page. auto web_contents = content::WebContents::FromRenderViewHost(host); -- 2.7.4