handling of UTF-8 in zipios++ on Win32
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user