linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #00516
[Bug 534440] Re: Incorrect encoding of file names, directories ...in the search box.
the general idea to be able to reliably find what hub a search result
comes from is to send search queries with a different token in each hub;
then on reception of a search result, simply match the received token to
the ones that have been sent.
DC++ does not currently do this, but the plan is there. there are a few
todo's scattered around the source to remind of this task...
--
Incorrect encoding of file names, directories ...in the search box.
https://bugs.launchpad.net/bugs/534440
You received this bug notification because you are a member of LinuxDC++
Team, which is subscribed to LinuxDC++.
Status in DC++: New
Status in Linux DC++: New
Bug description:
The problem with the coding in the search box if the user is connected to a hub such as the external IP address, and I'm on the inside then the function
ClientManager::getInstance()->findHub(hubIpPort) returns an empty url and a subsequent call to ClientManager::getInstance()->findHubEncoding(url)
returns the system encoding, and encoding CP1251 hub as a result of the search box in the file names, paths, nicknames does not display correctly.
void SearchManager:: onData (const uint8_t * buf, size_t aLen, const string & remoteIp) {
..........
string hubIpPort = x.substr(i, j-i);
string url = ClientManager::getInstance()->findHub(hubIpPort); >>> returns an empty url
string encoding = ClientManager::getInstance()->findHubEncoding(url); >>> does not return the correct encoding hub
nick = Text:: toUtf8 (nick, encoding);
file = Text:: toUtf8 (file, encoding);
hubName = Text:: toUtf8 (hubName, encoding);
...........
SearchResultPtr sr (new SearchResult (user, type, _slots, freeSlots, size,
file, hubName, url, remoteIp, TTHValue (tth), Util:: emptyString));
fire (SearchManagerListener:: SR (), sr);
...........
}
Forgive me, I used google translate
References