From: Sergei P. <po...@nb...> - 2004-02-18 16:39:50
|
>>>>> "Kuang-che" == Kuang-che Wu <kc...@kc...> writes: Kuang-che> Hello, Kuang-che> I found one problem related with utf8 character and toupper(). Kuang-che> When I use utf8 dictionary and running dictd in utf8 locale, Kuang-che> dictd crashed. Kuang-che> In index.c, line 1971, i->>> optStart[toupper(c(j))] Kuang-che> = i->optStart[c(j)] Kuang-che> = binary_search_8bit( buf, i, i->start, i->end ); Kuang-che> when c(j)==0xb5, Kuang-che> it's "greek small letter mu" in unicode. No, it's micro sign. Kuang-che> In my environment, toupper(c(j)) will return 0x39C, Kuang-che> "greek capital letter mu". Hm, that seems to be a bug in your locale: I believe, the micro sign (unlike the Greek letter mu) is not supposed to have an upper-case form. I did not check that in the standards, though. Kuang-che> then array out of boundary, crash. Kuang-che> I use FreeBSD 5.0 and locale zh_TW.UTF-8. -- Sergei |