-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathi18n.cpp
34 lines (27 loc) · 779 Bytes
/
i18n.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
This file has some own functionality and is used as backward
compatibility for vdr prior to version 1.5.7 language support.
Backward compatibility to old language support has been dropped
on Feb 13, 2015.
*/
#include "i18n.h"
#include <vdr/tools.h>
namespace vdrlive
{
I18n& LiveI18n()
{
static I18n instance;
return instance;
}
I18n::I18n()
: m_encoding(cCharSetConv::SystemCharacterTable() ? cCharSetConv::SystemCharacterTable() : "UTF-8")
{
// fix encoding spelling for HTML standard.
std::string const iso("iso");
if (m_encoding.find(iso) != std::string::npos) {
if (iso.length() == m_encoding.find_first_of("0123456789")) {
m_encoding.insert(iso.length(), "-");
}
}
}
} // namespace vdrlive