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