mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
*! Add support for hidden transcriptions (fixes rendering problems
with Babylon English-Hebrew dictionary).
This commit is contained in:
parent
c0935f8e13
commit
e7b8e7ab29
|
@ -421,6 +421,24 @@ bgl_entry Babylon::readEntry( ResourceHandler * resourceHandler )
|
|||
pos += length + 4;
|
||||
a += length + 3;
|
||||
}
|
||||
else if ( (unsigned char)block.data[pos] >= 0x40 &&
|
||||
len - a >= 2 &&
|
||||
(unsigned char)block.data[pos + 1 ] == 0x1B )
|
||||
{
|
||||
// Hidden transcription (a transcription which is usually the same
|
||||
// as the headword and shouldn't probably be visible).
|
||||
unsigned length = (unsigned char)block.data[ pos ] - 0x3F;
|
||||
|
||||
if ( length > len - a - 2 )
|
||||
{
|
||||
fprintf( stderr, "Hidden transcription is too large %s\n", headword.c_str() );
|
||||
pos += len - a;
|
||||
break;
|
||||
}
|
||||
|
||||
pos += length + 2;
|
||||
a += length + 1;
|
||||
}
|
||||
else if ( (unsigned char)block.data[pos] == 0x1E )
|
||||
{
|
||||
// Resource reference begin marker
|
||||
|
|
|
@ -190,7 +190,7 @@ public:
|
|||
|
||||
enum
|
||||
{
|
||||
ParserVersion = 3
|
||||
ParserVersion = 4
|
||||
};
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue