diff --git a/dic/compdic.cpp b/dic/compdic.cpp index 2d56f48..c91348d 100644 --- a/dic/compdic.cpp +++ b/dic/compdic.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -181,8 +182,20 @@ void readLetters(const string &iFileName, DictHeaderInfo &ioHeaderInfo) if (tokens.size() > 5) { - ioHeaderInfo.displayInputData[upChar] = - vector(tokens.begin() + 5, tokens.end()); + vector inputs(tokens.begin() + 5, tokens.end()); + // Ensure the input strings are in upper case + BOOST_FOREACH(wstring &str, inputs) + { + std::transform(str.begin(), str.end(), str.begin(), towupper); + } + + // If the display stirng is identical to the internal char and if + // there is no other input, no need to save this information, as + // it is already the default. + if (inputs.size() != 1 || inputs[0] != wstring(1, upChar)) + { + ioHeaderInfo.displayInputData[upChar] = inputs; + } } ++lineNb;