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:
@@ -77,7 +77,7 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const char * str, size_t len)
|
||||
{
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
TextStream<std::wstring>::Write(str, len);
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -85,13 +85,17 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::string * str)
|
||||
{
|
||||
return PutText(str->c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::string & str)
|
||||
{
|
||||
return PutText(str.c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -106,13 +110,17 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::wstring * str)
|
||||
{
|
||||
return PutText(str->c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::PutText(const std::wstring & str)
|
||||
{
|
||||
return PutText(str.c_str());
|
||||
TextStream<std::wstring>::operator<<(str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -294,8 +302,12 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const char * str)
|
||||
{
|
||||
for( ; *str ; ++str )
|
||||
ETextPutChar(*str);
|
||||
PT::UTF8ToWide(str, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
|
||||
tmp_string.clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -304,8 +316,12 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const char * str, size_t len)
|
||||
{
|
||||
for(size_t i=0 ; i<len ; ++i)
|
||||
ETextPutChar(str[i]);
|
||||
PT::UTF8ToWide(str, len, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
|
||||
tmp_string.clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -313,13 +329,20 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const std::string * str)
|
||||
{
|
||||
return EPutText(str->c_str(), str->size());
|
||||
return EPutText(*str);
|
||||
}
|
||||
|
||||
|
||||
HtmlTextStream & HtmlTextStream::EPutText(const std::string & str)
|
||||
{
|
||||
return EPutText(str.c_str(), str.size());
|
||||
PT::UTF8ToWide(str, tmp_string);
|
||||
|
||||
for(size_t i=0 ; i<tmp_string.size() ; ++i)
|
||||
ETextPutChar(tmp_string[i]);
|
||||
|
||||
tmp_string.clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user