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
if ( file.IsOpened() )
{
wxString text;
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
{
// 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
if ( file.IsOpened() )
{
wxString text;
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
{
// 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