changed: now we do not use std::string and char* in the Winix API
everywhere we are using std::wstring and wchar_t* (std::string and char* is used only locally in some places especially when creating a path to OS file system etc.) added: to the special thread when winix closes: a write function for curl: FetchPageOnExitCurlCallback() without this function the curl library will print the page's content to the standart output changed: TextStream<> class from core can make UTF8<->wide strings conversions removed: from config: utf8 option now winix expects UTF8 from the user's input (html forms, url-es) and outputs strings in the UTF8 format git-svn-id: svn://ttmath.org/publicrep/winix/trunk@965 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -42,7 +42,7 @@ namespace Winix
|
||||
|
||||
|
||||
|
||||
bool SessionParser::Parse(const std::string & path, SessionContainer & container)
|
||||
bool SessionParser::Parse(const std::wstring & path, SessionContainer & container)
|
||||
{
|
||||
return Parse(path.c_str(), container);
|
||||
}
|
||||
@@ -54,10 +54,16 @@ void SessionParser::SetUsers(Users * pusers)
|
||||
}
|
||||
|
||||
|
||||
bool SessionParser::Parse(const char * path, SessionContainer & container)
|
||||
bool SessionParser::Parse(const wchar_t * path, SessionContainer & container)
|
||||
{
|
||||
char file_path[WINIX_OS_PATH_SIZE];
|
||||
|
||||
container.Clear();
|
||||
file.open(path, std::ios_base::in | std::ios_base::binary);
|
||||
|
||||
if( !WideToUTF8(path, file_path, WINIX_OS_PATH_SIZE) )
|
||||
return false;
|
||||
|
||||
file.open(file_path, std::ios_base::in | std::ios_base::binary);
|
||||
|
||||
if( !file )
|
||||
{
|
||||
|
Reference in New Issue
Block a user