← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 534440] Re: Incorrect encoding of file names, directories ...in the search box.

 

ok. try to describe the situation

net1: 10.139.xx - internal LAN
net2: 92.255.xx - Public network direct access to the Internet (my network)
net2 has more internal addresses in the range 192.168.xx

all machines these networks to see each other and can exchange
information directly with peering

hub1 has address 10.130.0.226 and 2 public address 89.223.127.222

I connect to a hub at 89.223.127.222, but some users at 10.130.0.226
I can communicate with the user in active mode, and he with me but there is a problem
described by me in the search box.

In any case, it seems to me that the return from the function ClientManager::getInstance()->findHubEncoding(url)
Text:: systemCharset (systematic encoding) if not find a dc + + server is not correct because it
usually does not coincide with the coding dc + + server (in case of win32 clients the same on this there is no such problem).

In the setting of a parameter linuxdcpp <default-charset> so this value in my opinion and should return
function ClientManager:: getInstance () -> findHubEncoding (url) by default.

http://omploader.org/vM3NpMw/10.03.2010-13.49.12.png

-- 
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