diff --git a/src/dict/dsl_details.cc b/src/dict/dsl_details.cc index 96a43e478..a61901d0b 100644 --- a/src/dict/dsl_details.cc +++ b/src/dict/dsl_details.cc @@ -894,9 +894,7 @@ DslScanner::DslScanner( string const & fileName ): } } - codec = QTextCodec::codecForName( getEncodingNameFor( encoding ) ); - - qDebug() << "DSL encoding ->" << codec->name(); + qDebug() << "DSL encoding ->" << encoding; if ( gzrewind( f ) ) { gzclose( f ); @@ -1039,7 +1037,7 @@ bool DslScanner::readNextLine( std::u32string & out, size_t & offset, bool only_ if ( pos == -1 ) { return false; } - QString line = codec->toUnicode( readBufferPtr, pos ); + QString line = Iconv::toQString( getEncodingNameFor( encoding ), readBufferPtr, pos ); line = Utils::rstrip( line ); if ( pos > readBufferLeft ) { diff --git a/src/dict/dsl_details.hh b/src/dict/dsl_details.hh index 61a5b6217..e10267cd2 100644 --- a/src/dict/dsl_details.hh +++ b/src/dict/dsl_details.hh @@ -9,7 +9,6 @@ #include #include "dictionary.hh" #include "iconv.hh" -#include #include #include "text.hh" @@ -102,7 +101,6 @@ class DslScanner { gzFile f; Encoding encoding; - QTextCodec * codec; std::u32string dictionaryName; std::u32string langFrom, langTo; std::u32string soundDictionary;