handling of UTF-8 in zipios++ on Win32

This commit is contained in:
wmayer
2018-07-25 16:57:38 +02:00
parent 208f6d82f4
commit bb1dbd720a
3 changed files with 5 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
#include "zipinputstreambuf.h"
#include "zipinputstream.h"
#if defined(_WIN32)
#if defined(_WIN32) && defined(ZIPIOS_UTF8)
#include <Base/FileInfo.h>
#endif
@@ -27,7 +27,7 @@ ZipInputStream::ZipInputStream( const std::string &filename, std::streampos pos
: std::istream( 0 ),
ifs( 0 )
{
#if defined(_WIN32)
#if defined(_WIN32) && defined(ZIPIOS_UTF8)
std::wstring wsname = Base::FileInfo(filename).toStdWString();
ifs = new std::ifstream( wsname.c_str(), std::ios::in |std:: ios::binary ) ;
#else