comparison mcabber/src/utils.h @ 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 de6837908702
comparison
equal deleted inserted replaced
591:5a685e9012b4 592:67a332121aea
1 #ifndef __UTILS_H__ 1 #ifndef __UTILS_H__
2 #define __UTILS_H__ 1 2 #define __UTILS_H__ 1
3 3
4 extern char *LocaleCharSet;
5
4 #define to_utf8(s) ((s) ? g_locale_to_utf8((s), -1, NULL,NULL,NULL) : NULL) 6 #define to_utf8(s) ((s) ? g_locale_to_utf8((s), -1, NULL,NULL,NULL) : NULL)
5 #define from_utf8(s) ((s) ? g_locale_from_utf8((s), -1, NULL,NULL,NULL) : NULL) 7 #define from_utf8(s) ((s) ? g_convert_with_fallback((s), -1, LocaleCharSet, \
8 "UTF-8", NULL,NULL,NULL,NULL) : NULL)
6 9
7 void ut_InitDebug(unsigned int level, const char *file); 10 void ut_InitDebug(unsigned int level, const char *file);
8 void ut_WriteLog(unsigned int flag, const char *data); 11 void ut_WriteLog(unsigned int flag, const char *data);
9 12
10 int checkset_perm(const char *name, unsigned int setmode); 13 int checkset_perm(const char *name, unsigned int setmode);