aboutsummaryrefslogtreecommitdiffstats
path: root/src/plainTextPart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plainTextPart.cpp')
-rw-r--r--src/plainTextPart.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/plainTextPart.cpp b/src/plainTextPart.cpp
index bdb76c4d..7a1542d7 100644
--- a/src/plainTextPart.cpp
+++ b/src/plainTextPart.cpp
@@ -78,21 +78,10 @@ void plainTextPart::parse(shared_ptr <const bodyPart> /* message */,
shared_ptr <const contentTypeField> ctf =
textPart->getHeader()->findField <contentTypeField>(fields::CONTENT_TYPE);
- if (ctf)
- {
- try
- {
- m_charset = ctf->getCharset();
- }
- catch (exceptions::no_such_parameter&)
- {
- // No "charset" parameter.
- }
- }
+ if (ctf && ctf->hasCharset())
+ m_charset = ctf->getCharset();
else
- {
- // No "Content-type" field.
- }
+ m_charset = charset();
}