summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-09 11:52:53 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-09 11:52:53 +0100
commit2a96b61d31cc51611731297f936a477663871b9d (patch)
tree54753f4bf7dfbdd5fa49bcd48f0a7035fa95accc /src/MuxElements.cpp
parent6902285dbc1c816f9c16d1d63a151b2022c094dc (diff)
downloaddabmux-2a96b61d31cc51611731297f936a477663871b9d.tar.gz
dabmux-2a96b61d31cc51611731297f936a477663871b9d.tar.bz2
dabmux-2a96b61d31cc51611731297f936a477663871b9d.zip
Fail correctly on charset conversion error
Diffstat (limited to 'src/MuxElements.cpp')
-rw-r--r--src/MuxElements.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp
index a31791a..24c81b3 100644
--- a/src/MuxElements.cpp
+++ b/src/MuxElements.cpp
@@ -179,7 +179,7 @@ int DabLabel::setLabel(const std::string& label)
m_flag = 0xFF00; // truncate the label to the eight first characters
try {
- m_label = charset_converter.convert(label);
+ m_label = charset_converter.convert(label, false);
}
catch (const utf8::exception& e) {
etiLog.level(warn) << "Failed to convert label '" << label <<
@@ -196,9 +196,10 @@ int DabLabel::setLabel(const std::string& label, const std::string& short_label)
newlabel.m_flag = 0xFF00;
try {
- newlabel.m_label = charset_converter.convert(label);
+ newlabel.m_label = charset_converter.convert(label, false);
- int flag = newlabel.setShortLabel(charset_converter.convert(short_label));
+ int flag = newlabel.setShortLabel(
+ charset_converter.convert(short_label, false));
if (flag < 0) {
return flag;
}