comparison mcabber/src/screen.c @ 592:67a332121aea

Try UTF8 -> locale conversion with fallback
author Mikael Berthe <mikael@lilotux.net>
date Sun, 11 Dec 2005 11:11:34 +0100
parents fed6d1e4d7a9
children 7b20c27cae48
comparison
equal deleted inserted replaced
591:5a685e9012b4 592:67a332121aea
42 42
43 #define window_entry(n) list_entry(n, window_entry_t, list) 43 #define window_entry(n) list_entry(n, window_entry_t, list)
44 44
45 #define DEFAULT_LOG_WIN_HEIGHT (5+2) 45 #define DEFAULT_LOG_WIN_HEIGHT (5+2)
46 #define CHAT_WIN_HEIGHT (maxY-1-Log_Win_Height) 46 #define CHAT_WIN_HEIGHT (maxY-1-Log_Win_Height)
47
48 char *LocaleCharSet = "C";
47 49
48 static unsigned short int Log_Win_Height; 50 static unsigned short int Log_Win_Height;
49 51
50 static inline void check_offset(int); 52 static inline void check_offset(int);
51 53
222 224
223 inputLine[0] = 0; 225 inputLine[0] = 0;
224 ptr_inputline = inputLine; 226 ptr_inputline = inputLine;
225 227
226 setlocale(LC_CTYPE, ""); 228 setlocale(LC_CTYPE, "");
227 utf8_mode = (strcmp(nl_langinfo(CODESET), "UTF-8") == 0); 229 LocaleCharSet = nl_langinfo(CODESET);
230 utf8_mode = (strcmp(LocaleCharSet, "UTF-8") == 0);
228 231
229 return; 232 return;
230 } 233 }
231 234
232 void scr_TerminateCurses(void) 235 void scr_TerminateCurses(void)