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:
@@ -52,26 +52,33 @@ protected:
|
||||
bool skip_white_chars;
|
||||
bool recognize_special_chars;
|
||||
|
||||
int ParseHalfHex(int c);
|
||||
// if false then GetChar() returns wide characters (converted to int)
|
||||
// if true then GetChar() returns utf8 characters (we have to convert them from utf8 to wide chars)
|
||||
bool getchar_returns_utf8_chars;
|
||||
|
||||
int ParseHalfHex(int c);
|
||||
void ReadName();
|
||||
void ReadQuotedValue();
|
||||
void ReadNormalValue();
|
||||
void ReadValue();
|
||||
void Clear();
|
||||
|
||||
std::string last_name;
|
||||
std::string last_value;
|
||||
std::wstring last_name;
|
||||
std::wstring last_value;
|
||||
std::string utf8_token;
|
||||
|
||||
int last_c;
|
||||
int separator;
|
||||
|
||||
// '-1' means end (eof)
|
||||
// when there is an eof this method can be called more than once (it should always return -1 in such a case)
|
||||
virtual int GetChar() = 0;
|
||||
virtual void Parameter(std::string & last_name, std::string & last_value) = 0;
|
||||
virtual void Parameter(std::wstring & last_name, std::wstring & last_value) = 0;
|
||||
|
||||
void ToLower(std::string & s);
|
||||
void ToLower(std::wstring & s);
|
||||
bool IsWhite(int c);
|
||||
|
||||
void SkipWhiteChars();
|
||||
void TrimWhiteChars(std::string & s);
|
||||
void CheckSpecialChar();
|
||||
|
||||
void Parse();
|
||||
@@ -84,9 +91,10 @@ public:
|
||||
{
|
||||
separator = '&';
|
||||
read_name = true;
|
||||
value_can_be_quoted = false;
|
||||
skip_white_chars = false;
|
||||
recognize_special_chars = true;
|
||||
value_can_be_quoted = false;
|
||||
skip_white_chars = false;
|
||||
recognize_special_chars = true;
|
||||
getchar_returns_utf8_chars = false;
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user