From 966958202e53a41f0e54a93044bfe33bb8e282d2 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 10 Apr 2020 12:58:28 +0300 Subject: [PATCH] .mc/menu: Recode input filename Recode filenames for shitty programs that require filenames to be in UTF-8 encoding regardless of the current locale. --- .mc/menu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.mc/menu b/.mc/menu index a75bc49..a983ae6 100644 --- a/.mc/menu +++ b/.mc/menu @@ -26,16 +26,16 @@ g Edit the file in gvim + t lr b View the file in a browser - exec webbrowser file://%d/%f + exec webbrowser-encode-url -e utf-8 file://%d/%f + t lr = f \.(htm(l?)|txt)$ w View the file in a new browser window - exec webbrowser -n file://%d/%f + exec webbrowser-encode-url -e utf-8 -n file://%d/%f + t lr t View the file in a new browser tab - exec webbrowser -t file://%d/%f + exec webbrowser-encode-url -e utf-8 -t file://%d/%f += f \.fb2(\.bz2|\.gz|\.zip)?$ | f \.(chm|epub|htm(l?)|txt|rtf)$ & t lr f View fb2/chm/epub with fbreader @@ -63,7 +63,7 @@ T fb2txt += t lr & f \.(pdf|PDF|ps|PS)(\.bz2|\.gz)?$ e View pdf/ps - qpdfview %f & + qpdfview "`echo \"%f\" | sed 's/\\\\//g' | iconv -t utf-8`" & += t lr & f \.djvu(\.bz2|\.gz)?$ e View djvu -- 2.39.5