Do not fail if charset is not recognized.

This commit is contained in:
Vincent Richard 2012-10-15 11:19:53 +02:00
parent 771b9b7515
commit e4102b4374

View File

@ -695,7 +695,16 @@ const string word::getConvertedText(const charset& dest) const
{
string out;
charset::convert(m_buffer, out, m_charset, dest);
try
{
charset::convert(m_buffer, out, m_charset, dest);
}
catch (vmime::exceptions::charset_conv_error& e)
{
// Do not fail if charset is not recognized:
// copy 'word' as raw text
out = m_buffer;
}
return (out);
}