|A quote from the MySpell link of the SpellEdit article:
So you can't use MySpell with Unicode builds because it supports only ANSI character sets.
Quote:MySpell has been replaced with hunspell starting with OpenOffice.org 2.0.2. Hunspell builds on MySpell but supports Unicode and adds several other useful features.
Hunspell has Unicode support but uses UTF-8 strings while Windows uses UTF-16. So Windows strings must be converted to UTF-8 before passing them to the spell checker.
With UTF-8, strings are still passed as
char* because a single character is encoded as sequences of bytes with variable length while UTF-16 charcters are represented by two bytes (
wchar_t). When using
CString objects, they will be
CStringW according to the Unicode setting of your project. You may use
CStrings to convert between ANSI and Unicode:
LPCSTR lpszAnsi = "ANSI text";
LPWCSTR lpszWide = L"Unicode text";
CStringA strA = lpszWide; CStringW strW = lpszAnsi;
But for UTF-8 conversions, you must use
You may have a look at http://sourceforge.net/projects/hunspell/files/Misc/RichEdit/[^] which implements spell checking for a RichEdit control using Hunspell.