Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 18341:6736fc9bce24 gui-release
Set codec when loading/saving files in editor (Bug #41226)
* libgui/src/m-editor/file-editor-tab.cc: set UTF-8 codec on load and save.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Fri, 17 Jan 2014 19:51:22 -0500 |
parents | 3a26bb54655e |
children | 106da7544504 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -1011,6 +1011,7 @@ return file.errorString (); QTextStream in (&file); + in.setCodec("UTF-8"); QApplication::setOverrideCursor (Qt::WaitCursor); _edit_area->setText (in.readAll ()); QApplication::restoreOverrideCursor (); @@ -1077,6 +1078,7 @@ // save the contents into the file QTextStream out (&file); + out.setCodec("UTF-8"); QApplication::setOverrideCursor (Qt::WaitCursor); out << _edit_area->text (); out.flush ();