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:
2010-11-21 00:19:17 +00:00
parent f1f0fa34cb
commit 8e72a820dd
153 changed files with 4270 additions and 2784 deletions

View File

@@ -124,7 +124,7 @@ void TicketInfo::DeleteAllMarkedConf()
}
bool TicketInfo::GetConfContent(const std::string & path)
bool TicketInfo::GetConfContent(const std::wstring & path)
{
long path_dir_id;
@@ -152,7 +152,7 @@ return true;
}
bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::string & path)
bool TicketInfo::ParseTicketConf(long mount_dir_id, const std::wstring & path)
{
log << log3 << "Ticket: parsing conf file: " << path << logend;
@@ -177,7 +177,7 @@ void TicketInfo::ReadTicketConf(Mounts & mounts, bool skip_existing_configs)
if( mount.param[mount_par_ticket_conf].defined &&
mount.param[mount_par_ticket_conf].arg.size() == 1 )
{
const std::string & file_name = mount.param[mount_par_ticket_conf].arg[0];
const std::wstring & file_name = mount.param[mount_par_ticket_conf].arg[0];
ConfTab::iterator c = conf_tab.find(mount.dir_id);
bool exists = (c != conf_tab.end() && c->second.file_name == file_name);
@@ -275,8 +275,8 @@ return false;
void TicketInfo::ReadTicketParams()
{
PostTab::iterator i;
const char parstr[] = "ticketparam"; // !! dodac do konfiga? i szablony tez niech bior<6F> z konfiga
size_t parlen = sizeof(parstr) / sizeof(char) - 1;
const wchar_t parstr[] = L"ticketparam"; // !! dodac do konfiga? i szablony tez niech bior<6F> z konfiga
size_t parlen = sizeof(parstr) / sizeof(wchar_t) - 1;
Ticket::TicketParam param;
ticket.par_tab.clear();
@@ -285,8 +285,8 @@ Ticket::TicketParam param;
{
if( IsSubString(parstr, i->first.c_str()) )
{
param.param = atoi(i->first.c_str() + parlen);
param.value = atoi(i->second.c_str());
param.param = Atoi(i->first.c_str() + parlen);
param.value = Atoi(i->second);
if( CheckMinMaxValue(param) )
ticket.par_tab.push_back(param);