Support Stardict IFO file encoded with UTF-8. This kind of ifo file is created by StarDict Editor v3.03. Fix issue #42

This commit is contained in:
Julian Depetris Chauvin 2012-07-20 22:04:57 -03:00
parent fc73dcfc3e
commit b3c82b2d06

View file

@ -873,7 +873,7 @@ Ifo::Ifo( File::Class & f ):
//DPRINTF( "%s<\n", f.gets().c_str() ); //DPRINTF( "%s<\n", f.gets().c_str() );
//DPRINTF( "%s<\n", f.gets().c_str() ); //DPRINTF( "%s<\n", f.gets().c_str() );
if ( f.gets() != "StarDict's dict ifo file" || if ( QString::fromUtf8(f.gets().c_str()) != "StarDict's dict ifo file" ||
f.gets().compare( 0, versionEq.size(), versionEq ) ) f.gets().compare( 0, versionEq.size(), versionEq ) )
throw exNotAnIfoFile(); throw exNotAnIfoFile();