Quote:
Originally Posted by tompe
The language code setting consists of two parts. The first (12) is the main laguage. The second part is the "sub language" and they are:
Code:
1 => "FRENCH",
2 => "FRENCH_BELGIAN",
3 => "FRENCH_CANADIAN",
4 => "FRENCH_SWISS",
5 => "FRENCH_LUXEMBOURG",
6 => "FRENCH_MONACO",
The printout from mobi2mobi is "code - main language - sub language".
|
Huh, you're stripping the bottom two bits from the region code in that example. I'd noticed that they always seemed to be zero, but I hadn't found any particular reason to separate them. I see that the mobi2mobi output is still using the full byte, however.
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.)