diff --git a/src/zipios++/zipfile.cpp b/src/zipios++/zipfile.cpp index 90a281c358..76edc1d222 100644 --- a/src/zipios++/zipfile.cpp +++ b/src/zipios++/zipfile.cpp @@ -9,6 +9,7 @@ #include "zipios_defs.h" #include "backbuffer.h" +#include namespace zipios { @@ -33,7 +34,12 @@ ZipFile::ZipFile( const string &name , int s_off, int e_off _filename = name ; +#if _WIN32 + std::wstring wsname = Base::FileInfo(name).toStdWString(); + ifstream _zipfile( wsname.c_str(), ios::in | ios::binary ) ; +#else ifstream _zipfile( name.c_str(), ios::in | ios::binary ) ; +#endif init( _zipfile ) ; } diff --git a/src/zipios++/zipinputstream.cpp b/src/zipios++/zipinputstream.cpp index b2363345cb..b048a5995c 100644 --- a/src/zipios++/zipinputstream.cpp +++ b/src/zipios++/zipinputstream.cpp @@ -5,6 +5,7 @@ #include "zipinputstreambuf.h" #include "zipinputstream.h" +#include using std::istream; @@ -24,7 +25,12 @@ ZipInputStream::ZipInputStream( const std::string &filename, std::streampos pos : std::istream( 0 ), ifs( 0 ) { +#if _WIN32 + std::wstring wsname = Base::FileInfo(filename).toStdWString(); + ifs = new std::ifstream( wsname.c_str(), std::ios::in |std:: ios::binary ) ; +#else ifs = new std::ifstream( filename.c_str(), std::ios::in |std:: ios::binary ) ; +#endif izf = new ZipInputStreambuf( ifs->rdbuf(), pos ) ; // this->rdbuf( izf ) ; is replaced by: this->init( izf ) ;