Mercurial > octave-dspies
changeset 18299: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 | 01646e48a650 |
children | e8176099889c |
files | libgui/src/m-editor/file-editor-tab.cc |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc Thu Jan 16 23:04:58 2014 +0100 +++ b/libgui/src/m-editor/file-editor-tab.cc Fri Jan 17 19:51:22 2014 -0500 @@ -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 ();