From 163d9efc6b109f4c2faf7895524a32fd72a390a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 11 May 2007 20:05:37 +0000 Subject: [PATCH] avoid conversion to wchar_t* when getting UTF-8 value in UTF-8 build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/tarstrm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/tarstrm.cpp b/src/common/tarstrm.cpp index ea0c0d14a8..400a4e3989 100644 --- a/src/common/tarstrm.cpp +++ b/src/common/tarstrm.cpp @@ -1362,11 +1362,16 @@ void wxTarOutputStream::SetExtendedHeader(const wxString& key, 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]; -- 2.45.2