minetestmapper/CharEncodingConverterIConv.h
Rogier 570ed84fd2 Convert text drawn on the map to ISO8859-2 (which is what libgd uses)
Using non-ISO8859-2 encoded text (e.g. utf-8), or anything else,
may result in garbage characters.
2016-01-17 10:37:52 +01:00

22 lines
527 B
C++

#ifndef _CHARENCODINGCONVERTERICONV_H_INCLUDED_
#define _CHARENCODINGCONVERTERICONV_H_INCLUDED_
#include <iconv.h>
#include "CharEncodingConverter.h"
class CharEncodingConverterIConv : public CharEncodingConverter
{
public:
CharEncodingConverterIConv(std::string to, std::string from = "");
virtual ~CharEncodingConverterIConv(void);
static std::string getCurrentCharEncoding(void);
std::string convert(const std::string &src) override;
private:
iconv_t m_iconv;
};
#endif // _CHARENCODINGCONVERTERICONV_H_INCLUDED_