Show
Ignore:
Timestamp:
2000-09-08 01:05:17 (8 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Add a character set comparison function.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • charset.c

    r2111 r2112  
    233233} 
    234234 
    235 int mutt_is_utf8 (const char *s) 
    236 { 
    237   char buffer[8]; 
    238  
    239   if (!s)  
    240     return 0; 
     235int mutt_chscmp (const char *s, const char *chs) 
     236{ 
     237  char buffer[STRING]; 
     238 
     239  if (!s) return 0; 
    241240 
    242241  mutt_canonical_charset (buffer, sizeof (buffer), s); 
    243   return !mutt_strcmp (buffer, "utf-8"); 
     242  return !mutt_strcasecmp (buffer, chs); 
    244243} 
    245244