error check

This commit is contained in:
Glenn Maynard
2004-11-04 23:00:20 +00:00
parent 9f06afa9a4
commit 24614c9bc4
@@ -45,6 +45,11 @@ static bool ConvertFromCharset( CString &txt, const char *charset )
return true;
iconv_t converter = iconv_open( "UTF-8", charset );
if( converter == (iconv_t) -1 )
{
LOG->MapLog( ssprintf("conv %s", charset), "iconv_open(%s): %s", charset, strerror(errno) );
return false;
}
/* Copy the string into a char* for iconv */
char *txtin = new char[ txt.size() + 1 ];