New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

BGL dictionaries reported to have 0 entries

Report bugs here

Re: BGL dictionaries reported to have 0 entries

Postby ebrahim » Sat Apr 17, 2010 11:00 pm

I digged further into problem of Al-Waseet file and found out most definitions are type 10 blocks, and can all be parsed and handled correctly by current parser. But there is a tiny problem: some entries (for example the first entry!) have an empty headword! Because emptiness of headword is used as a sign of end-of-file, parser gives up at the first empty-headword entry, which is in this case the first entry.
ebrahim
 
Posts: 7
Joined: Sat Oct 10, 2009 10:40 am

Re: BGL dictionaries reported to have 0 entries

Postby ebrahim » Sat Apr 17, 2010 11:22 pm

Code: Select all
diff --git a/src/bgl_babylon.cc b/src/bgl_babylon.cc
index 8ae6b7b..d552cc1 100644
--- a/src/bgl_babylon.cc
+++ b/src/bgl_babylon.cc
@@ -551,6 +551,9 @@ bgl_entry Babylon::readEntry( ResourceHandler * resourceHandler )
 
         if( block.length ) free( block.data );
 
+               if (entry.headword.empty())
+                       entry.headword += ' ';
+
         return entry;
 
         break;
Attachments
bgl-early-giveup-hacky-workaround.patch.gz
a hacky workaround for BGL early-giveup bug
(277 Bytes) Downloaded 754 times
ebrahim
 
Posts: 7
Joined: Sat Oct 10, 2009 10:40 am

Re: BGL dictionaries reported to have 0 entries

Postby ikm » Thu Apr 22, 2010 6:25 pm

Thanks, applied.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Previous

Return to Bugs

Who is online

Users browsing this forum: No registered users and 67 guests