document why we are not using ucs-4 when communicating with aspell

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16249 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-12-12 08:17:22 +00:00
parent d08210e961
commit 0928419638

View File

@ -57,6 +57,13 @@ void ASpell::addSpeller(string const & lang)
AspellConfig * config = new_aspell_config(); AspellConfig * config = new_aspell_config();
// FIXME The aspell documentation says to use "lang" // FIXME The aspell documentation says to use "lang"
aspell_config_replace(config, "language-tag", lang.c_str()); aspell_config_replace(config, "language-tag", lang.c_str());
// Set the encoding to utf-8.
// aspell does also understand "ucs-4", so we would not need a
// conversion in theory, but if this is used it expects all
// char const * arguments to be a cast from uint const *, and it
// seems that this uint is not compatible with our char_type on some
// platforms (cygwin, OS X). Therefore we use utf-8, that does
// always work.
aspell_config_replace(config, "encoding", "utf-8"); aspell_config_replace(config, "encoding", "utf-8");
AspellCanHaveError * err = new_aspell_speller(config); AspellCanHaveError * err = new_aspell_speller(config);
if (spell_error_object) if (spell_error_object)