<<< Date Index >>>     <<< Thread Index >>>

Re: mutt/2305: [patch] UTF-8 characters do not display correctly with S-lang on an xterm



The following reply was made to PR mutt/2305; it has been noted by GNATS.

From: Rocco Rutte <pdmef@xxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2305: [patch] UTF-8 characters do not display correctly with 
S-lang on an xterm
Date: Tue, 11 Jul 2006 20:05:57 +0000

 --M9NhX3UHpAaciwkO
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Disposition: inline
 
 Hi,
 
 * rsmith@xxxxxxxxx [06-06-23 19:40:51 +0200] wrote:
 >Fix:
 >The fix is to apply the following patch to main.c:
 
 As said, this cannot go in as 1.x doesn't have it. The attached patch 
 works for both Slang 1.x and 2.x with UTF-8 support for 2.x. A first 
 quick test with UTF-8 chars in $index_format shows a great improvement 
 over non-UTF-8 enabled.
 
 Please apply.
 
    bye, Rocco
 -- 
 :wq!
 
 --M9NhX3UHpAaciwkO
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=patch-slang
 
 diff --git a/main.c b/main.c
 index 8590125..a0ea336 100644
 --- a/main.c
 +++ b/main.c
 @@ -497,6 +497,9 @@ #ifdef USE_SLANG_CURSES
    SLtt_Ignore_Beep = 1; /* don't do that #*$@^! annoying visual beep! */
    SLsmg_Display_Eight_Bit = 128; /* characters above this are printable */
    SLtt_set_color(0, NULL, "default", "default");
 +#if SLANG_VERSION >= 20000
 +  SLutf8_enable(1);
 +#endif
  #else
    /* should come before initscr() so that ncurses 4.2 doesn't try to install
       its own SIGWINCH handler */
 diff --git a/mutt_curses.h b/mutt_curses.h
 index a1a2ad2..8ee3d45 100644
 --- a/mutt_curses.h
 +++ b/mutt_curses.h
 @@ -26,7 +26,9 @@ #ifndef unix /* this symbol is not defin
  #define unix
  #endif /* unix */
  
 -#include "slcurses.h"
 +#include <slang.h>    /* in addition to slcurses.h, we need slang.h for the 
version
 +                         number to test for 2.x having UTF-8 support in 
main.c */
 +#include <slcurses.h>
  
  #define KEY_DC SL_KEY_DELETE
  #define KEY_IC SL_KEY_IC
 
 --M9NhX3UHpAaciwkO--