diff options
author | Vincent Richard <[email protected]> | 2012-10-15 09:19:53 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2012-10-15 11:33:54 +0000 |
commit | e4102b4374e3acde31c9d320166ef37855834c72 (patch) | |
tree | 9e941825eb8f80c3bcc1b448194a5f791db4c7b6 | |
parent | Merge pull request #12 from burner/patch-1 (diff) | |
download | vmime-e4102b4374e3acde31c9d320166ef37855834c72.tar.gz vmime-e4102b4374e3acde31c9d320166ef37855834c72.zip |
Do not fail if charset is not recognized.
-rw-r--r-- | src/word.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/word.cpp b/src/word.cpp index 2876ddfb..1ea22931 100644 --- a/src/word.cpp +++ b/src/word.cpp @@ -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); } |