dictd
dictd copied to clipboard
dict: MIME OPTION problem
The version number of the dict: 1.12.1/rf
How to reproduce the problem.
Go to the terminal prompt. Enter the command
dict -h dict.bibleonline.ru --mime "ide"
and press enter. You will not receive any response from the DICT-server.
Now, if you enter another command:
dict -h dict.bibleonline.ru --mime "ide" "idea"
You will have the following result:
1 definition found
From Греческо-русский лексикон Нового Завета [ell-rus_strong]:
Content-type: text/html; charset=utf-8
Content-transfer-encoding: 8bit
2397 ἰδέα idea
вид (1. наружность, внешность;<BR>2. разновидность, тип);<BR><I TITLE='синоним
' STYLE='COLOR: GREEN; CURSOR:DEFAULT'>син.</I> 3444 (μορφή), 4976 (σχῆμα).
Make one more test:
dict -h dict.bibleonline.ru --mime - "ide" "idea"
1 definition found
From Греческо-русский лексикон Нового Завета [ell-rus_strong]:
Content-type: text/html; charset=utf-8
Content-transfer-encoding: 8bit
2396 ἴδε ide
вот, се, смотри, посмотри;<BR><I TITLE='второе лицо, единственное число, повел
ительное наклонение, действительный залог от' STYLE='COLOR: GREEN; CURSOR:DEFAUL
T'>2-е л. ед.ч. повел. действ. от</I> 1492 (εἰδῶ, οἶδα).
1 definition found
From Греческо-русский лексикон Нового Завета [ell-rus_strong]:
Content-type: text/html; charset=utf-8
Content-transfer-encoding: 8bit
2397 ἰδέα idea
вид (1. наружность, внешность;<BR>2. разновидность, тип);<BR><I TITLE='синоним
' STYLE='COLOR: GREEN; CURSOR:DEFAULT'>син.</I> 3444 (μορφή), 4976 (σχῆμα).
Conclusion: The element following the mime option (--mime) is treated as an parameter for this option. While the mime option does not have a parameter.
This should fix it. Change line 1366 in dict.c to
{ "mime", 0, 0, 'M' },