From e7b6bef7c5e8fe436b506a316275f9bb08969415 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 7 Jul 2013 11:47:17 +0000 Subject: [PATCH] Use wxConvAuto() in wxStyledTextCtrl::DoLoadFile(). This is both more reasonable than the current runtime encoding (the input file is from unknown source) and more robust (it can handle UTF-* encoded files transparently). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/stc/stc.cpp | 2 +- src/stc/stc.cpp.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index 64c3c3f..1dc93c2 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -4433,7 +4433,7 @@ wxStyledTextCtrl::DoLoadFile(const wxString& filename, int WXUNUSED(fileType)) if ( file.IsOpened() ) { wxString text; - if ( file.ReadAll(&text, *wxConvCurrent) ) + if ( file.ReadAll(&text, wxConvAuto()) ) { // Detect the EOL: we use just the first line because there is not // much we can do if the file uses inconsistent EOLs anyhow, we'd diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index f407276..a635b56 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -571,7 +571,7 @@ wxStyledTextCtrl::DoLoadFile(const wxString& filename, int WXUNUSED(fileType)) if ( file.IsOpened() ) { wxString text; - if ( file.ReadAll(&text, *wxConvCurrent) ) + if ( file.ReadAll(&text, wxConvAuto()) ) { // Detect the EOL: we use just the first line because there is not // much we can do if the file uses inconsistent EOLs anyhow, we'd -- 2.7.4