I am betting the problem is here:
Code:
QString Utility::getSpellingSafeText(const QString &raw_text)
{
// There is currently a problem with Hunspell if we attempt to pass
// words with smart apostrophes from the CodeView encoding.
// There are likely better ways to solve this, but this one does
// get the job done until someone can implement something better.
QString text(raw_text);
return text.replace(QString::fromUtf8("\u2019"), "'");
}
Windows source files probably use different encodings instead of utf-8 and the unicode constant is \u2019 is not being properly converted to a utf-8 string in this function.
u2019 in utf-8 is a 3 byte sequence: 0xE2 0x80 0x99 and so fromUtf8 routine should be passed that byte sequence or we load QChar with u2019 and then use toUtf8 to generate the input or better yet use the QChar directly.