blob: f0f9d3e67a02b51cecd36dfa1d018a5c26301452 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <mbgl/util/utf.hpp>
#include <boost/locale/encoding_utf.hpp>
namespace mbgl {
namespace util {
std::u16string convertUTF8ToUTF16(const std::string& str) {
return boost::locale::conv::utf_to_utf<char16_t>(str);
}
std::string convertUTF16ToUTF8(const std::u16string& str) {
return boost::locale::conv::utf_to_utf<char>(str);
}
} // namespace util
} // namespace mbgl
|