mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 18:20:26 +01:00
remove POCO_WIN32_UTF8
This commit is contained in:
parent
c7c6871c4a
commit
7872c35324
@ -33,7 +33,7 @@
|
||||
#include <sqlucode.h>
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#define POCO_ODBC_UNICODE
|
||||
#define POCO_ODBC_UNICODE_WINDOWS
|
||||
#elif defined(POCO_OS_FAMILY_UNIX) && defined(UNICODE)
|
||||
|
@ -29,11 +29,7 @@ FileStreamTest::~FileStreamTest()
|
||||
|
||||
void FileStreamTest::testRead()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_WIN32_UTF8)
|
||||
char tmp[]={'\xc4', '\xd6', '\xdc', '\xe4', '\xf6', '\xfc', '\0'};
|
||||
std::string file(tmp);
|
||||
file.append(".txt");
|
||||
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
char tmp[]={'\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\0'};
|
||||
std::string file(tmp);
|
||||
file.append(".txt");
|
||||
@ -57,11 +53,7 @@ void FileStreamTest::testRead()
|
||||
|
||||
void FileStreamTest::testWrite()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_WIN32_UTF8)
|
||||
char tmp[]={'\xdf', '\xc4', '\xd6', '\xdc', '\xe4', '\xf6', '\xfc', '\0'};
|
||||
std::string file(tmp);
|
||||
file = "dummy_" + file + (".txt");
|
||||
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
char tmp[]={'\xc3', '\x9f', '\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\0'};
|
||||
std::string file(tmp);
|
||||
file = "dummy_" + file + ".txt";
|
||||
@ -86,15 +78,9 @@ void FileStreamTest::testWrite()
|
||||
|
||||
void FileStreamTest::testReadWrite()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_WIN32_UTF8)
|
||||
char tmp[]={'\xdf', '\xc4', '\xd6', '\xdc', '\xe4', '\xf6', '\xfc', '\0'};
|
||||
std::string file(tmp);
|
||||
file = "dummy_" + file + (".txt");
|
||||
#else
|
||||
char tmp[]={'\xc3', '\x9f', '\xc3', '\x84', '\xc3', '\x96', '\xc3', '\x9c', '\xc3', '\xa4', '\xc3', '\xb6', '\xc3', '\xbc', '\0'};
|
||||
std::string file(tmp);
|
||||
file = "dummy_" + file + ".txt";
|
||||
#endif
|
||||
|
||||
Poco::TemporaryFile::registerForDeletion(file);
|
||||
|
||||
|
@ -584,7 +584,7 @@ void FileTest::testRenameFailIfExists() {
|
||||
|
||||
void FileTest::testLongPath()
|
||||
{
|
||||
#if defined(_WIN32) && defined(POCO_WIN32_UTF8) && !defined(_WIN32_WCE)
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
Poco::Path p("longpathtest");
|
||||
p.makeAbsolute();
|
||||
std::string longpath(p.toString());
|
||||
|
@ -17,16 +17,16 @@
|
||||
#include "Poco/Environment.h"
|
||||
#include <iostream>
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8)
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#if defined(_WIN32_WCE)
|
||||
#include "Poco/Path_WINCE.h"
|
||||
#else
|
||||
#include "Poco/Path_WIN32U.h"
|
||||
#endif
|
||||
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#include "Poco/Path_WIN32.h"
|
||||
#endif
|
||||
|
||||
|
||||
using Poco::Path;
|
||||
using Poco::PathSyntaxException;
|
||||
using Poco::Environment;
|
||||
|
@ -162,18 +162,13 @@ protected:
|
||||
{
|
||||
checkFile();
|
||||
|
||||
#if defined(_WIN32) && defined(POCO_WIN32_UTF8)
|
||||
#if defined(_WIN32)
|
||||
std::wstring wpath;
|
||||
Poco::UnicodeConverter::toUTF16(_path, wpath);
|
||||
if (InFile_OpenW(&_archiveStream.file, wpath.c_str()) != SZ_OK)
|
||||
{
|
||||
throw Poco::OpenFileException(_path);
|
||||
}
|
||||
#else
|
||||
if (InFile_Open(&_archiveStream.file, _path.c_str()) != SZ_OK)
|
||||
{
|
||||
throw Poco::OpenFileException(_path);
|
||||
}
|
||||
#endif
|
||||
|
||||
_lookStream.realStream = &_archiveStream.s;
|
||||
|
Loading…
Reference in New Issue
Block a user