From 3339915d204d1e6ccfe948e9df050e6b16a5a84b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 13 Feb 2021 12:28:53 +0100 Subject: url-mode: store URL in UTF-8, not UTF-32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The only time the URL is actually in UTF-32 is when we’re collecting it (auto-detecting it) from the grid, since cells store their character(s) in UTF-32. Everything *after* that prefers the URL in UTF-8. So, do the conversion while collecting the URL. This patch also changes the URL activation code to strip the ‘file://user@host/’ prefix from file URIs that refer to files on the *local* computer. --- terminal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 94433178..39d02859 100644 --- a/terminal.h +++ b/terminal.h @@ -227,7 +227,7 @@ typedef tll(struct ptmx_buffer) ptmx_buffer_list_t; enum url_action { URL_ACTION_COPY, URL_ACTION_LAUNCH }; struct url { - wchar_t *url; + char *url; wchar_t *text; wchar_t *key; struct coord start; -- cgit v1.3