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

@@ -2,6 +2,7 @@ if(WIN32)
add_definitions(-DFCBase)
add_definitions(-DPYCXX_DLL)
add_definitions(-DBOOST_DYN_LINK)
add_definitions(-DZIPIOS_UTF8)
endif(WIN32)
include_directories(

View File

@@ -9,7 +9,7 @@
#include "zipios_defs.h"
#include "backbuffer.h"
#if defined(_WIN32)
#if defined(_WIN32) && defined(ZIPIOS_UTF8)
#include <Base/FileInfo.h>
#endif
@@ -36,7 +36,7 @@ ZipFile::ZipFile( const string &name , int s_off, int e_off
_filename = name ;
#if defined(_WIN32)
#if defined(_WIN32) && defined(ZIPIOS_UTF8)
std::wstring wsname = Base::FileInfo(name).toStdWString();
ifstream _zipfile( wsname.c_str(), ios::in | ios::binary ) ;
#else

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