Show
Ignore:
Timestamp:
2001-02-14 15:35:28 (8 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

iconv-hook.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • charset.c

    r2292 r2295  
    196196  { "ko_KR-euc",        "euc-kr"        }, 
    197197  { "zh_TW-big5",       "big5"          }, 
    198    
    199    
    200    
    201    
     198 
     199  /* seems to be common on some systems */ 
     200 
     201  { "sjis",             "Shift_JIS"     }, 
     202 
    202203   
    203204  /* End of aliases.  Please keep this line last. */ 
     
    307308  char *tmp; 
    308309 
     310  iconv_t cd; 
     311   
    309312  mutt_canonical_charset (tocode1, sizeof (tocode1), tocode); 
    310313  if ((flags & M_ICONV_HOOK_TO) && (tmp = mutt_charset_hook (tocode1))) 
     
    315318    mutt_canonical_charset (fromcode1, sizeof (fromcode1), tmp); 
    316319 
    317   return iconv_open (tocode1, fromcode1); 
     320  if ((cd = iconv_open (tocode1, fromcode1)) != (iconv_t) -1) 
     321    return cd; 
     322  /* else */ 
     323  return iconv_open (mutt_iconv_hook (tocode1), mutt_iconv_hook (fromcode1)); 
    318324} 
    319325