18#include <cpl_string.h>
32 char *res = CPLRecode( chars, mName.constData(), CPL_ENC_UTF8 );
39 const QString result = QString::fromUtf8( res );
49 const QString src = QString( unicode, length );
50 char *res = CPLRecode( src.toUtf8().constData(), CPL_ENC_UTF8, mName.constData() );
57 const QByteArray result = QByteArray( res );
72 return QList<QByteArray>();
83 static QStringList codecs;
84 static std::once_flag initialized;
85 std::call_once( initialized, [&]( )
91 for (
int i = 437; i <= 950; ++i )
92 codecs << QStringLiteral(
"CP%1" ).arg( i );
93 for (
int i = 1250; i <= 1258; ++i )
94 codecs << QStringLiteral(
"CP%1" ).arg( i );
95 codecs << QStringLiteral(
"CP1251" );
QByteArray name() const override
QByteArray convertFromUnicode(const QChar *in, int length, ConverterState *state) const override
QgsOgrProxyTextCodec(const QByteArray &name)
Constructor for QgsOgrProxyTextCodec, for the specified encoding name.
QString convertToUnicode(const char *in, int length, ConverterState *state) const override
int mibEnum() const override
QList< QByteArray > aliases() const override
static QStringList supportedCodecs()
Returns a list of supported text codecs.