diff --git a/src/output_plaintext.cpp b/src/output_plaintext.cpp index cc67213782..e825ac83e7 100644 --- a/src/output_plaintext.cpp +++ b/src/output_plaintext.cpp @@ -41,7 +41,8 @@ using std::string; void writePlaintextFile(Buffer const & buf, FileName const & fname, OutputParams const & runparams) { - odocfstream ofs("UTF-8"); + odocfstream ofs; + ofs << setEncoding("UTF-8"); if (!openFileWrite(ofs, fname)) return; writePlaintextFile(buf, ofs, runparams);