Unprintable characters with --enable-charset



   I want to continue discussion about displaying unprintable
characters. 
   The problem has arised when I tried to use new experimental
feature "Support for charset selection and
conversion" (--enable-charset). I set c_y_r_i_l_l_i_c input encodings
and decided to view any binary file. After few strokes on PgDn MC screen
was completely crashed and I saw invitation to search strange regex. 
   In case of not cyrillic ISO encodings I have not noticed such a strange
behaviour. I think this is happened because of wrong
is_printable() function or furthermore incorrect printable[] initalization
in charset.c .
   My decision to this problem isn't very nice but effective

----------------------------------------------------------------------
--- util.c      Thu Aug 16 07:52:51 2001                                        
+++ util.c      Wed Sep  5 00:55:32 2001                                        
@@ -109,13 +109,16 @@                                                           
                                                                                
     c &= 0xff;                                                                 
 #ifdef HAVE_CHARSET                                                            
-    if (display_codepage < 0) {                                                
+/* Because of broken printable[] in charset.c            */                    
+/* we still need in filtering characters #127 and #155       */                
+/* FIX ME!!! */                                                                
+//   if (display_codepage < 0) {                                               
        if (xterm_flag)                                                         
            return xterm_printable[c];                                          
        else                                                                    
            return (c > 31 && c != 127 && c != 155);                            
-    } else                                                                     
-       return printable[ c ];                                                  
+//    } else                                                                   
+//     return printable[ c ];                                                  
 #else                                                                          
     if (eight_bit_clean){                                                      
         if (full_eight_bits){                                                  
---------------------------------------------------------------------------

         Best regards,
                                Quantum Leap






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]