+ if ( m_char )
+ return m_char.data();
+
+ // in ANSI build, wx_str() returns char*, in UTF-8 build, this function
+ // is only called under UTF-8 locales, so we should return UTF-8 string,
+ // which is, again, what wx_str() returns:
+ if ( m_str )
+ return m_str->wx_str();
+
+ // ditto wxCStrData:
+ if ( m_cstr )
+ return m_cstr->AsInternal();
+
+ // the last case is that wide string was passed in: in that case, we need
+ // to convert it:
+ wxASSERT( m_wchar );
+
+ m_char = wxConvLibc.cWC2MB(m_wchar.data());
+
+ return m_char.data();