* mu-util.[ch]: add mu_util_locale_is_utf8, handle invalid utf8 string more gracefully

This commit is contained in:
Dirk-Jan C. Binnema
2011-06-01 21:52:58 +03:00
parent 8b7d0f9b06
commit 7019bd9b86
2 changed files with 36 additions and 7 deletions

View File

@ -135,6 +135,13 @@ int mu_util_create_writeable_fd (const char* path, mode_t mode,
gboolean mu_util_is_local_file (const char* path);
/**
* is the current locale utf-8 compatible?
*
* @return TRUE if it's utf8 compatible, FALSE otherwise
*/
gboolean mu_util_locale_is_utf8 (void) G_GNUC_CONST;
/**
* write a string (assumed to be in utf8-format) to a stream,
* converted to the current locale