Hi,
Someday after looking inside /Library/Dictionaries/New Oxford American
Dictionary.dict, I found that the bundle mainly consists with two
file: one called dict_body which is XML-formated and another called
dictionary_1, some binary index file.
I modified the XML formated dict_body but it didn't work. The problem
is the index file dictionary1. After half of a day of researching, I
realized that the file is related with Carbon Dictionary Manger. I
tried to figure out how Dictionary Manger works by reading the
document that apple provided.
(http://developer.apple.com/documentation/Carbon/Reference/Dictionary_Manager/)
Unfortunately, it's just a short description so I can't really
understand that. I can register a dictionary file, get the record
count (DCMCountRecord), ... etc. But I don't know how to iterate
through the records? For example, I open the New Oxford American
Dictionary, how do I get the record from 'a' to 'zymurgy' one by one?
I don't know what is the meaning of field tag and field type. I get
the field info record (what is this?) by DCMGetDictionaryFieldInfo()
but don't know how to interpret its data. I dump the data out and know
it's 420 bytes:
dle2 00 00 00 00 list 00 00 01 r4 00 00 00 00 00 00 00
00 00 00 00 18 list 00 00 00 03 00 00 00 00 reco 00 00 00
T 00 00 00 05 00 00 00 00 ftagenum 00 00 00 04 dshwftypenum
00 00 00 04 utxtmrszmagn 00 00 00 04 00 00 00 00 fatrfatr 00
00 00 04 00 00 00 06 fdefnull 00 00 00 00 reco 00 00 00 T
00 00 00 05 00 00 00 00 ftagenum 00 00 00 04 dsbdftypenum 00
00 00 04 utxtmrszmagn 00 00 00 04 00 00 00 00 fatrfatr 00
00 00 04 00 00 00 06 fdefnull 00 00 00 00 reco 00 00 00 mC
00 00 00 06 00 00 00 00 ftagenum 00 00 00 04 dskyftypenum
00 00 00 04 utxtmrszmagn 00 00 00 04 00 00 00 00 fatrfatr 00
00 00 04 00 00 00 07 fdefnull 00 00 00 00 ffndlist 00 00
00 \ 00 00 00 07 00 00 00 00 fmth 00 00 00 04 bgwtfmth 00
00 00 04 endsfmth 00 00 00 04 = 20 20 20 fmth 00 00 00 04
ftrifmth 00 00 00 04 ftrlfmth 00 00 00 04 fulafmth 00 00 00
04 fulo
Mmm. Stucked. Any tips?
Thanks.
--
yllan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden
This email sent to email@hidden