X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FBuffer.cpp;h=7ab95e8f0ea53360609a82439d2add74e86ac26e;hb=974f44ea79acb58808f45e9a417e651b764de2ba;hp=0b2c71b1cc86111e305c21950318032de4ea180a;hpb=9a7ad1efed7319df8ea0123c88a93d3ec2539304;p=features.git diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 0b2c71b1cc..7ab95e8f0e 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1009,7 +1009,15 @@ bool Buffer::makeLaTeXFile(FileName const & fname, string const encoding = runparams.encoding->iconvName(); LYXERR(Debug::LATEX, "makeLaTeXFile encoding: " << encoding << "..."); - odocfstream ofs(encoding); + odocfstream ofs; + try { ofs.reset(encoding); } + catch (iconv_codecvt_facet_exception & e) { + lyxerr << "Caught iconv exception: " << e.what() << endl; + Alert::error(_("Iconv software exception Detected"), bformat(_("Please " + "verify that the support software for your encoding (%1$s) is " + "properly installed"), from_ascii(encoding))); + return false; + } if (!openFileWrite(ofs, fname)) return false;