[wx-dev] wxMac wxFileExists problem
Robin Dunn
robin at alldunn.com
Wed Sep 5 15:42:59 PDT 2007
Robin Dunn wrote:
> Vadim Zeitlin wrote:
>> On Wed, 5 Sep 2007 14:25:50 -0400 David Elliott <dfe at cox.net> wrote:
>>
>> DE> When wxUSE_UNICODE_UTF8 then the wxString::mb_str converts from
>> the DE> UTF-8 gotten from m_impl.c_str() to wide characters. It then
>> converts DE> from wide characters using the specified wxMBConv.
>> There's actually a DE> minor issue here in that this is truly
>> unnecessary in Robin's DE> particular case since the particular
>> wxMBConv_cf instantiation is the DE> one for UTF-8 and thus if it
>> simply returned true from IsUTF8() then DE> the conversion could be
>> bypassed entirely. But that doesn't really DE> fix the bug with the
>> conversion so we'll ignore that for now.
>>
>> Why is wxMBConv_cf used at all for UTF-8 conversions though? I
>> thought we
>> always preferred to use wxMBConvUTF8 for them?
>
> What about for fn_str? That is the case I've been dealing with.
>
> const wxCharBuffer fn_str() const { return mb_str(wxConvFile); }
>
Oh, BTW, while working on this I noticed that wxFileExists calls wxStat
with filename.fn_str() and wxStat also uses filename.fn_str(). I expect
one of then should not be doing so, but which one? (I would guess
wxFileExists but figured I should ask to be sure.)
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-dev
mailing list