}
cout << endl;
-
+
string sense;
db->exec(
sql::query("SELECT sense, gloss FROM gloss WHERE lang=%Q AND entry=%s "
if (options::source == options::JAPANESE && !isUTF8)
options::source = options::JAPANESE_ROMAJI;
else if (options::source == options::UNKNOWN)
- options::source = isUTF8 ? options::JAPANESE : options::NOT_JAPANESE;
+ // options::source = isUTF8 ? options::JAPANESE : options::NOT_JAPANESE;
+ options::source = isUTF8 ? options::JAPANESE : options::UNKNOWN;
}
int main(int argc, char** argv)
}
string subject = argv[optind];
db.reset(new sql::db(DICTIONARY_PATH));
-
+
guessLanguage(subject);
if (options::source == options::JAPANESE)
fromJapanese(subject);
else if (options::source == options::JAPANESE_ROMAJI)
fromRomaji(subject);
- else
+ else if (options::source == options::NOT_JAPANESE)
toJapanese(subject);
+ else {
+ fromRomaji(subject);
+ toJapanese(subject);
+ }
cout << entries << " match(es) found." << endl;
return EXIT_SUCCESS;