[empathy] Use UTF-8 encoding for webview
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Use UTF-8 encoding for webview
- Date: Tue, 15 Nov 2016 19:26:37 +0000 (UTC)
commit d28a6772cfdaf1539b09b8744791c2d448737f8a
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Nov 15 13:23:35 2016 -0600
Use UTF-8 encoding for webview
It would be nice to see UTF-8 characters.
This is untested because of various problems:
* I have no clue how I ever managed to run empathy-chat in the past. It
seems designed to be as difficult to test in JHBuild as possible, and
I'm not about to install it into /usr
* It doesn't support srcdir != builddir, so some hacks were required to
even build it.
So if this is broken and blows up, that's why. Just revert it.
libempathy-gtk/empathy-log-window.c | 4 ++++
libempathy-gtk/empathy-theme-adium.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index b3a66e7..79e3804 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -752,6 +752,10 @@ empathy_log_window_init (EmpathyLogWindow *self)
self->priv->gsettings_desktop,
EMPATHY_PREFS_DESKTOP_INTERFACE_FONT_NAME);
+ g_object_set (webkit_web_view_get_settings (self->priv->webview),
+ "default-encoding", "utf8",
+ NULL);
+
filename = empathy_file_lookup ("empathy-log-window.html", "data");
gfile = g_file_new_for_path (filename);
g_free (filename);
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 5c5b7a7..5df45e4 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -1660,6 +1660,10 @@ theme_adium_constructed (GObject *object)
EMPATHY_PREFS_DESKTOP_INTERFACE_DOCUMENT_FONT_NAME);
}
+ g_object_set (webkit_web_view_get_settings (webkit_view),
+ "default-encoding", "utf8",
+ NULL);
+
/* Setup webkit inspector */
webkit_inspector = webkit_web_view_get_inspector (webkit_view);
g_signal_connect (webkit_inspector, "inspect-web-view",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]