summaryrefslogtreecommitdiffstats
path: root/src/MuxElements.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-09 11:43:10 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-09 11:43:10 +0100
commit6902285dbc1c816f9c16d1d63a151b2022c094dc (patch)
tree4ea42146ffbcb54ad27526f4659099f77d435610 /src/MuxElements.h
parentf4ef1284d754ecd907dd4ed3072f8be65b26f2de (diff)
downloaddabmux-6902285dbc1c816f9c16d1d63a151b2022c094dc.tar.gz
dabmux-6902285dbc1c816f9c16d1d63a151b2022c094dc.tar.bz2
dabmux-6902285dbc1c816f9c16d1d63a151b2022c094dc.zip
Convert labels from utf-8 to EBU
Diffstat (limited to 'src/MuxElements.h')
-rw-r--r--src/MuxElements.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/MuxElements.h b/src/MuxElements.h
index ba9941f..1f3f548 100644
--- a/src/MuxElements.h
+++ b/src/MuxElements.h
@@ -147,7 +147,11 @@ struct dabOutput {
class DabLabel
{
public:
- /* Set a new label and short label.
+ /* Set a new label and short label. If the label parses as valid UTF-8, it
+ * will be converted to EBU Latin. If utf-8 decoding fails, the label
+ * will be used as is. Characters that cannot be converted are replaced
+ * by a space.
+ *
* returns: 0 on success
* -1 if the short_label is not a representable
* -2 if the short_label is too long
@@ -170,7 +174,7 @@ class DabLabel
void writeLabel(uint8_t* buf) const;
uint16_t flag() const { return m_flag; }
- const std::string long_label() const { return m_label; }
+ const std::string long_label() const;
const std::string short_label() const;
private:
@@ -182,7 +186,7 @@ class DabLabel
/* The m_label is not padded in any way */
std::string m_label;
- /* Checks and calculates the flag */
+ /* Checks and calculates the flag. slabel must be EBU Latin Charset */
int setShortLabel(const std::string& slabel);
};