X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Faspell.C;h=69252704041db9471ae5ec63dd67acad668c261d;hb=b3ced091d2eb7b1f2e174973614157b1c26c7001;hp=29a8f81422c5822d34f32b1ead64e3208efe08e2;hpb=9c62a5e33203753312d0ee7c45922303c2ab124f;p=lyx.git diff --git a/src/aspell.C b/src/aspell.C index 29a8f81422..6925270404 100644 --- a/src/aspell.C +++ b/src/aspell.C @@ -57,6 +57,13 @@ void ASpell::addSpeller(string const & lang) AspellConfig * config = new_aspell_config(); // FIXME The aspell documentation says to use "lang" 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"); AspellCanHaveError * err = new_aspell_speller(config); if (spell_error_object)