mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-12-25 09:01:47 +00:00
Chinese char code fix.
This commit is contained in:
parent
e3407a5e11
commit
434b02f4cb
12
finder.cpp
12
finder.cpp
@ -386,6 +386,11 @@ int ContentFilter(const char *buff, int port, const char *ip, char *cp, int sz)
|
||||
codec = QTextCodec::codecForName("Windows-1251");
|
||||
strLower = codec->toUnicode(buff);
|
||||
}
|
||||
else if (strstri(cp, "gb") != NULL)
|
||||
{
|
||||
codec = QTextCodec::codecForName("GB2312");
|
||||
strLower = codec->toUnicode(buff);
|
||||
}
|
||||
else strLower = QString(buff);
|
||||
strLower = strLower.toLower();
|
||||
|
||||
@ -699,11 +704,16 @@ void putInFile(int flag, const char *ip, char *port, int size, char *finalstr, c
|
||||
codec = QTextCodec::codecForName("UTF-8");
|
||||
strf = codec->toUnicode(finalstr);
|
||||
}
|
||||
else if(strstri(cp, "cp") != NULL || strstri(cp, "windows") != NULL)
|
||||
else if (strstri(cp, "cp") != NULL || strstri(cp, "windows") != NULL)
|
||||
{
|
||||
codec = QTextCodec::codecForName("Windows-1251");
|
||||
strf = codec->toUnicode(finalstr);
|
||||
}
|
||||
else if (strstri(cp, "gb") != NULL)
|
||||
{
|
||||
codec = QTextCodec::codecForName("GB2312");
|
||||
strf = codec->toUnicode(finalstr);
|
||||
}
|
||||
else strf = QString(finalstr);
|
||||
|
||||
if(flag != 6 && flag != 5 && flag != 4)
|
||||
|
@ -1624,6 +1624,7 @@ void _connect() {
|
||||
if (Connector::_ConnectToPort((char*)ip.c_str(), portArr[i]) == -2) break;
|
||||
};
|
||||
--cons;
|
||||
stt->doEmitionUpdateArc(gThreads);
|
||||
}
|
||||
else lk.unlock();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user