mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
Decode some html-coded symbols in stardict index
This commit is contained in:
parent
ec845a977e
commit
824e5846a7
10
stardict.cc
10
stardict.cc
|
@ -81,7 +81,7 @@ struct Ifo
|
|||
enum
|
||||
{
|
||||
Signature = 0x58444953, // SIDX on little-endian, XDIS on big-endian
|
||||
CurrentFormatVersion = 7 + BtreeIndexing::FormatVersion + Folding::Version
|
||||
CurrentFormatVersion = 8 + BtreeIndexing::FormatVersion + Folding::Version
|
||||
};
|
||||
|
||||
struct IdxHeader
|
||||
|
@ -1009,6 +1009,14 @@ static void handleIdxSynFile( string const & fileName,
|
|||
|
||||
uint32_t offset;
|
||||
|
||||
if( strstr( word, "&#" ) )
|
||||
{
|
||||
// Decode some html-coded symbols in headword
|
||||
string unescapedWord = Html::unescapeUtf8( word );
|
||||
strncpy( (char *)word, unescapedWord.c_str(), wordLen );
|
||||
wordLen = strlen( word );
|
||||
}
|
||||
|
||||
if ( !isSynFile )
|
||||
{
|
||||
// We're processing the .idx file
|
||||
|
|
Loading…
Reference in a new issue