added support for UTF-8
now the UTF-8 is a default charset git-svn-id: svn://ttmath.org/publicrep/winix/trunk@677 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -56,7 +56,7 @@ void winix_function_is(Info & i)
|
||||
|
||||
void winix_function_param_is(Info & i)
|
||||
{
|
||||
i.res = request->IsParam(i.par.c_str());
|
||||
i.res = request->IsParam(i.par);
|
||||
}
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ char buf[20];
|
||||
|
||||
void winix_err_is(Info & i)
|
||||
{
|
||||
int value = atoi( i.par.c_str() );
|
||||
int value = Atoi(i.par);
|
||||
i.res = (request->status == value);
|
||||
}
|
||||
|
||||
@@ -164,14 +164,15 @@ void winix_err_code(Info & i)
|
||||
|
||||
|
||||
|
||||
static std::string winix_error_key;
|
||||
static std::wstring winix_error_key;
|
||||
|
||||
|
||||
void winix_is_err_in_locales(Info & i)
|
||||
{
|
||||
char buff[40];
|
||||
wchar_t buff[40];
|
||||
size_t buff_len = sizeof(buff) / sizeof(wchar_t);
|
||||
|
||||
sprintf(buff, "winix_err_%d", request->status);
|
||||
swprintf(buff, buff_len, L"winix_err_%d", request->status);
|
||||
winix_error_key = buff;
|
||||
|
||||
i.res = locale.IsKey(winix_error_key);
|
||||
@@ -180,9 +181,10 @@ char buff[40];
|
||||
|
||||
void winix_err_msg_from_locales(Info & i)
|
||||
{
|
||||
char buff[40];
|
||||
wchar_t buff[40];
|
||||
size_t buff_len = sizeof(buff) / sizeof(wchar_t);
|
||||
|
||||
sprintf(buff, "winix_err_%d", request->status);
|
||||
swprintf(buff, buff_len, L"winix_err_%d", request->status);
|
||||
winix_error_key = buff;
|
||||
|
||||
i.out << locale.Get(winix_error_key);
|
||||
@@ -192,7 +194,7 @@ char buff[40];
|
||||
void winix_show_content_in_full_window(Info & i)
|
||||
{
|
||||
if( request->function )
|
||||
i.res = (request->function->fun.url == "ckeditor" || request->function->fun.url == "tinymce");
|
||||
i.res = (request->function == &functions->fun_ckeditor || request->function == &functions->fun_tinymce);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user