return;
}
- /* Parent process: Read ispells identification message */
+ // Parent process: Read ispells identification message
bool err_read;
bool error = select(err_read);
return;
}
- /* must have read something from stderr */
+ // must have read something from stderr
+ // FIXME UNICODE: buf is not in UTF8, but probably the locale encoding
error_ =from_utf8(buf);
} else {
// select returned error
}
-string const ISpell::nextMiss()
+docstring const ISpell::nextMiss()
{
// Well, somebody is a sick fuck.
if (str == 0 || *(e+1) == '\0')
- return "";
+ return docstring();
char * b = e + 2;
e = strpbrk(b, ",\n");
*e = '\0';
if (b)
- return b;
- return "";
+ // FIXME UNICODE: b is not in UTF8, but probably the locale encoding
+ return from_utf8(b);
+ return docstring();
}
Result res;
- ::fputs(word.word().c_str(), out);
+ // FIXME UNICODE: we don't need to convert to UTF8, but probably to the locale encoding
+ ::fputs(to_utf8(word.word()).c_str(), out);
::fputc('\n', out);
bool err_read;
}
if (err_read) {
+ // FIXME UNICODE: buf is not in UTF8, but probably the locale encoding
error_ = from_utf8(buf);
return UNKNOWN_WORD;
}
void ISpell::insert(WordLangTuple const & word)
{
::fputc('*', out); // Insert word in personal dictionary
- ::fputs(word.word().c_str(), out);
+ // FIXME UNICODE: we don't need to convert to UTF8, but probably to the locale encoding
+ ::fputs(to_utf8(word.word()).c_str(), out);
::fputc('\n', out);
}
void ISpell::accept(WordLangTuple const & word)
{
::fputc('@', out); // Accept in this session
- ::fputs(word.word().c_str(), out);
+ // FIXME UNICODE: we don't need to convert to UTF8, but probably to the locale encoding
+ ::fputs(to_utf8(word.word()).c_str(), out);
::fputc('\n', out);
}