123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #include <kopano/platform.h>
- #include <kopano/ECIConv.h>
- namespace KC {
- ECIConv::ECIConv(const std::string &strToCharset, const std::string &strFromCharset) {
- try {
- m_lpContext = new context_t(strToCharset.c_str(), strFromCharset.c_str());
- } catch (const convert_exception &) {
- m_lpContext = NULL;
- }
- }
- ECIConv::~ECIConv()
- {
- delete m_lpContext;
- }
- std::string ECIConv::convert(const std::string &strinput)
- {
- return m_lpContext->convert(strinput);
- }
- }
|