#2086 Fix well GUI name for well paths when extended ascii chars in name

This commit is contained in:
Bjørn Erik Jensen
2018-02-02 15:03:41 +01:00
parent b0ca4f3199
commit d5116d8942
@@ -21,6 +21,8 @@
#include "RigWellLogCurveData.h" #include "RigWellLogCurveData.h"
#include "RifStringTools.h"
#include "RimWellLogCurve.h" #include "RimWellLogCurve.h"
#include "well.hpp" #include "well.hpp"
@@ -80,11 +82,8 @@ bool RigWellLogFile::open(const QString& fileName, QString* errorMessage)
try try
{ {
int wellFormat = NRLib::Well::LAS; int wellFormat = NRLib::Well::LAS;
#ifdef _WINDOWS
well = NRLib::Well::ReadWell(fileName.toStdString(), wellFormat); well = NRLib::Well::ReadWell(RifStringTools::toNativeEncoded(fileName).data(), wellFormat);
#else
well = NRLib::Well::ReadWell(fileName.toUtf8().data(), wellFormat);
#endif
if (!well) if (!well)
{ {
return false; return false;
@@ -152,7 +151,7 @@ void RigWellLogFile::close()
QString RigWellLogFile::wellName() const QString RigWellLogFile::wellName() const
{ {
CVF_ASSERT(m_wellLogFile); CVF_ASSERT(m_wellLogFile);
return QString::fromStdString(m_wellLogFile->GetWellName()); return RifStringTools::fromNativeEncoded(m_wellLogFile->GetWellName().data());
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------