if ((value = GetExtendedHeader(m_hdr->Name(id))) != wxEmptyString) {
wxTarNumber n = 0;
- const wxChar *p = value;
- while (*p == ' ')
+ wxString::const_iterator p = value.begin();
+ while (*p == ' ' && p != value.end())
p++;
while (isdigit(*p))
n = n * 10 + (*p++ - '0');
const wxString& value)
{
if (m_pax) {
+#if wxUSE_UNICODE
+ const wxCharBuffer utf_key = key.utf8_str();
+ const wxCharBuffer utf_value = value.utf8_str();
+#else
const wxWX2WCbuf wide_key = key.wc_str(GetConv());
const wxCharBuffer utf_key = wxConvUTF8.cWC2MB(wide_key);
const wxWX2WCbuf wide_value = value.wc_str(GetConv());
const wxCharBuffer utf_value = wxConvUTF8.cWC2MB(wide_value);
+#endif // wxUSE_UNICODE/!wxUSE_UNICODE
// a small buffer to format the length field in
char buf[32];