From ac8eccd035a4676938fb08d70b23bc4dfb9fa4d6 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 18 Jul 2015 19:48:13 +0100 Subject: Enable RISC OS to display decoded IDNs in the URL bar (subject to local charset restrictions) --- riscos/window.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'riscos') diff --git a/riscos/window.c b/riscos/window.c index 097ab9ee6..dbed46d2a 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1038,8 +1038,16 @@ void gui_window_set_pointer(struct gui_window *g, gui_pointer_shape shape) /* exported function documented in riscos/window.h */ nserror ro_gui_window_set_url(struct gui_window *g, nsurl *url) { + char *idn_url = NULL; + if (g->toolbar) { - ro_toolbar_set_url(g->toolbar, nsurl_access(url), true, false); + if (nsoption_bool(display_decoded_idn) == false) { + ro_toolbar_set_url(g->toolbar, nsurl_access(url), true, false); + } else { + idn_url = nsurl_access_utf8(url); + ro_toolbar_set_url(g->toolbar, idn_url, true, false); + free(idn_url); + } ro_gui_url_complete_start(g->toolbar); } -- cgit v1.2.3