<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 10, 2018 at 9:24 AM, Shawn Waldon <span dir="ltr"><<a href="mailto:shawn.waldon@kitware.com" target="_blank">shawn.waldon@kitware.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-">On Wed, Jan 10, 2018 at 7:13 AM, David Cole via vtkusers <span dir="ltr"><<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Have you tried<br>
<br>
"reader->SetFileName(fileName.<wbr>toStdString().c_str());"<br>
<br>
?<br>
<div><div class="gmail-m_4658801853251904397h5"><br></div></div></blockquote></span><div>If your filename may have international characters in it, you will want filename.toLocal8Bit().data() instead. But filename.toStdString().c_str() will work fine with only ASCII in the filename.</div><div><br></div></div></div></div></blockquote><div>I have been bitten by this a few times, when dealing with files, the STL, etc you really need to be careful to use toLocal8Bit(), see <a href="https://bugreports.qt.io/browse/QTBUG-39086">https://bugreports.qt.io/browse/QTBUG-39086</a> for some further background. You will of course be fine until you encounter non Latin characters, so toLatin1 or toStdString may work out for common use cases with US-based users.</div><div><br></div><div>Marcus</div></div></div></div>