Ticket #9243: 0001-openwrt-allow-overriding-charset-with-CMUS_CHARSET-e.patch

File 0001-openwrt-allow-overriding-charset-with-CMUS_CHARSET-e.patch, 866 bytes (added by Johannes W <devnull.openwrt@…>, 6 years ago)
  • ui_curses.c

    From 859fe7166cc0809a7045a086c77d3df4fd214e7a Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Johannes=20Wei=C3=9Fl?= <jargon@molb.org>
    Date: Fri, 1 Apr 2011 02:13:29 +0200
    Subject: [PATCH 1/2] openwrt: allow overriding charset with CMUS_CHARSET environment variable
    
    nl_langinfo(CODESET) always returns "ASCII".
    ---
     ui_curses.c |    7 +++++--
     1 files changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/ui_curses.c b/ui_curses.c
    index 49fe706..b1d1463 100644
    a b int main(int argc, char *argv[]) 
    22432243        } 
    22442244 
    22452245        setlocale(LC_CTYPE, ""); 
     2246        charset = getenv("CMUS_CHARSET"); 
     2247        if (!charset) { 
    22462248#ifdef CODESET 
    2247         charset = nl_langinfo(CODESET); 
     2249                charset = nl_langinfo(CODESET); 
    22482250#else 
    2249         charset = "ISO-8859-1"; 
     2251                charset = "ISO-8859-1"; 
    22502252#endif 
     2253        } 
    22512254        if (strcmp(charset, "UTF-8") == 0) 
    22522255                using_utf8 = 1; 
    22532256