From: Diego N. <die...@ya...> - 2002-07-31 16:16:34
|
Hi All, > Until the manpage is corrected, it will be > necessary to read the source code to see where > the header ends for each option. Ok. I haven't read the "formal documentation" for dictfmt, yet. :-) > > and dupplicating the last word on the index file. > > I verified the "last word problem" with wn too. > A patch to fix that bug would be welcome. I will see what I can do. The dict-wn distribution has the word "Zyrian" repeated at wn.index, though. Maybe we could just remove it manually until we have a patch. Concerning multilanguage support, here is my point of view, regardless of the plans for full UTF8 support: Supporting LC_CTYPE is very usefull because it enables non english locales to use whichever characters they consider to be "isalpha", and also enables the system to correctly convert between upper and lower case characters by using standard "tolower" and "toupper" macros. I understand the index file has to be sorted, of course. What I don't see is enough reasons to sort the index under different locales. For the binary search to work, it doesn't really matters which characters come before which, as long as the order used in the index file is the same as the order the searching algorithm expects. For that, one could stick to pure strcmp (which uses the C locale, period). I think this would simplify the code in dictd/index.c, dictfmt.c and yet make the system more robust. The way things are at the present, changing the locale used by the dictd daemon can break a dict/index pair: the server will fail to find words that are in the database because it is expecting a different order. Mandating the C LC_COLLATE locale (or just using strcmp) will solve this. The signed/unsigned problem is a different story... Running the following program #include <locale.h> #include <ctype.h> #include <stdio.h> int main(void) { setlocale(LC_CTYPE, "en_US"); printf("%d %c %d %c\n", á __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |