my comment #7 was completely wrong. it applied to ADC hubs, which are not affected by these encoding issues since they are all UTF-8. there is however no plan to modify NMDC searches to have a hub differenciating token.
the current logic indeed breaks when faced with public/private address discrepancies. there is a fallback to finding a user only by nick were the nick+address match to fail (call to ClientManager::findLegacyUser in SearchManager::onData) but the resulting user isn't used to deduce a proper encoding. -- You received this bug notification because you are a member of Dcplusplus-team, which is subscribed to DC++. https://bugs.launchpad.net/bugs/534440 Title: Incorrect encoding of file names, directories ...in the search box. Status in DC++: Confirmed Status in Linux DC++: Confirmed 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 To manage notifications about this bug go to: https://bugs.launchpad.net/dcplusplus/+bug/534440/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : linuxdcpp-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp