![]() |
#1 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
dictionaries and languages
Hi all,
I have two French dictionaries in mobipocket format, and some French books in my Cybook. The problem is when I look up a word in a French book, only one of the dictionaries is searched, while the other seems to be used for English books (I've had some matches from this other dictionary when looking up a word in English). I understand this is probably a matter of language settings, however both dictionaries seem to have the same language, according to mobi2mobi: Code:
MOBIHEADER language: 1036 - 12 - 1 - FRENCH - Code:
MOBIHEADER language: 12 - 12 - 0 - FRENCH - |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
Code:
1 => "FRENCH", 2 => "FRENCH_BELGIAN", 3 => "FRENCH_CANADIAN", 4 => "FRENCH_SWISS", 5 => "FRENCH_LUXEMBOURG", 6 => "FRENCH_MONACO", |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() ![]() ![]() ![]() Posts: 57
Karma: 307
Join Date: Oct 2008
Device: PalmOS PDA
|
Quote:
I also note that the language code of '1036' isn't even valid, and the number makes me think that mobi2mobi has a bad language parser -- 1036 breaks down into 1024+12, meaning that the parser is pulling more than one byte for the language code, and not correctly separating the unknown value. Language code 12, region code 12 is "French (Canada)", however. I'm more interested by the fact that there is a nonzero unknown value at all, though. Where did you obtain this e-book, and is it freely redistributable (or at least cheap)? I'd be interested in seeing what the EBook::Tools parser makes of it. My offhanded guess is that while the main language is set correctly on one of the dictionaries, the dictionary language values are wrong. (There are actually three language codes embedded -- one for the main language, one for the dictionary input language, and one for the dictionary output language.) |
|
![]() |
![]() |
![]() |
#5 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
Were do you get your information from? |
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Here is the language parsing:
Code:
sub get_language_desc { my $code = shift; my $lid = $code & 0xFF; my $lang = $mainlanguage{$lid}; my $sublid = ($code >> 10) & 0xFF; my $sublang = $langmap->{$lang}->{$sublid}; my $res = ""; $res .= "$lang"; $res .= " - $sublang"; return $res; } |
![]() |
![]() |
![]() |
#8 | ||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
The differences I noticed: The "wrong" version was latin1-encoded, and gives with mobi2mobi: Code:
EXTH doctype: EXTH EXTH length: 96 EXTH n_items: 2 EXTH item: 100 - Author - 18 - Académie Française EXTH item: 300 - 300 - 48 - 0x3000000000000008002000000000000000f9beefe41c91e91c21e8409340a6 Code:
EXTH doctype: EXTH EXTH length: 144 EXTH n_items: 6 EXTH item: 100 - Author - 20 - Académie Française EXTH item: 300 - 300 - 48 - 0x3000000000000008002000000000000000e4f9beef1e91c21e81c9409340a6 EXTH item: 204 - 204 - 4 - 0x0002 EXTH item: 205 - 205 - 4 - 0x0004 EXTH item: 206 - 206 - 4 - 0x0002 EXTH item: 207 - 207 - 4 - 0x00027 Quote:
|
||
![]() |
![]() |
![]() |
#9 | |
Connoisseur
![]() ![]() ![]() ![]() Posts: 57
Karma: 307
Join Date: Oct 2008
Device: PalmOS PDA
|
Quote:
What Kindle Java code is this, and where did you obtain it?d Last edited by AZed; 11-23-2008 at 06:05 PM. Reason: typo |
|
![]() |
![]() |
![]() |
#10 | |
Connoisseur
![]() ![]() ![]() ![]() Posts: 57
Karma: 307
Join Date: Oct 2008
Device: PalmOS PDA
|
Quote:
Did I download the wrong file? (And ugh, I've got a bug in my HUFF/CDIC unpacker. I'm running out of bits again during the decompress, and I don't know why.) |
|
![]() |
![]() |
![]() |
#11 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
|
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#12 |
Connoisseur
![]() ![]() ![]() ![]() Posts: 57
Karma: 307
Join Date: Oct 2008
Device: PalmOS PDA
|
Ah, because I had thought the three numbers represented the same three segments I was using (language/region/unknown). My bad. It looks like what mobi2mobi is printing is "unsplit value" / "language code" / "region code >> 2", and once you look at them like that, the numbers make sense again, and the values match what I'm getting. Never mind, then.
Last edited by AZed; 11-23-2008 at 06:05 PM. |
![]() |
![]() |
![]() |
#13 |
Connoisseur
![]() ![]() ![]() ![]() Posts: 57
Karma: 307
Join Date: Oct 2008
Device: PalmOS PDA
|
Jellby, is there any way you could send me the "wrong" version (by uploading it to Rapidshare or some other file hosting service, for instance) so that I could have a peek at it? I'd like to confirm my theory.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Why can't I read in other languages? | Margok | Kobo Reader | 61 | 01-29-2015 04:42 AM |
Dictionary Languages | petblue | Ectaco jetBook | 2 | 07-19-2010 07:26 PM |
Support for other languages? | Matth3w | Calibre | 8 | 04-15-2009 02:25 AM |
Languages other than English | ThePage | Feedback | 22 | 03-13-2009 11:56 PM |
Other languages? | irishjew | Sony Reader | 2 | 07-17-2007 03:30 PM |