search results drop in passive mode for encoding other then utf8

Bug #489670 reported by mindsectr
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LinuxDC++
New
Undecided
Unassigned

Bug Description

Hub encoding is cp1251. Encoding is correctly set in client.

Search works different for passive and active modes.
When in active mode - you can type searchstring in cp1251 and everything works fine (there are results and their filenames are correct).
When in passive mode - for the same searchstring in cp1251 there are no results(13 results dropped in status line). And when trying to search by TTH - filenames in results are broken the same way described at bug (#324462).

Manual browsing works fine in both modes.

OS: opensuse 11.1 (2.6.27.37-0.1-default)
LinuxDC++ version: 1.0.3+bzr
Core version: 0.75

Revision history for this message
Razzloss (razzloss) wrote :

Not sure if this really is duplicate of bug #310292 but it sure does sound like it... Or to put it in another way I don't think there's nothing that can be done until that other bug is fixed.

--RZ

Revision history for this message
NoSFeRaTU (master-nosferatu) wrote :

I have same issues with broken cp1251 codepage on my hub, other hubs are unaffected. After some researching i found out that reason of that behavior in core lib, especially in find hub algorithm which not supported "multihome" hubs. If search result received from user which connected through another hub`s ip then findHub function failed because ips not equal, then fails FindHubEncoding function (which uses findHub function result as parameter) and fallback to "System charset", in my case it is UTF-8. After that Text::toUtf8 tries to convert nick,file,... from that system charset to utf-8 and completely destroyed all non-latin characters.

Some debug output for understanding:
NSFDEBUG:: SearchonData IP "", buf - "$SR [beeline]bazilio клипы\lordi Фрагмент 15.mp463809913 3/5TTH:TO3B7Q7OSQ4BXZWHA4WQPRPXZEUQKFFFW5UZLZQ (10.151.96.60 :411)", file "клипы\lordi Фрагмент 15.mp4"
NSFDEBUG:: findHub - ipPort - "10.151.96.60 :411", ip - "10.151.96.60 ", port - "411"
NSFDEBUG:: findHubForCycle - getIp - "10.1.1.100", ip - "10.151.96.60 ", getPort - "411", getHubUrl - "dc.ganjanetwork.org.ru"
NSFDEBUG:: findHubEncoding - Charset Not Equal, Skipping - "CP1251" because "dc.ganjanetwork.org.ru"!=""
NSFDEBUG:: findHubEncoding - Going to System Charset - "UTF-8"
NSFDEBUG:: SearchonData2 encoding "UTF-8", hubname "TTH:TO3B7Q7OSQ4BXZWHA4WQPRPXZEUQKFFFW5UZLZQ", nick - "[beeline]bazilio", file "\lordi 15.mp4"
NSFDEBUG:: SearchonData IP "", buf - "$SR [Citycomm]zamamam Видео\клипы 15/15TTH:GD22GA5SUUJAFCUXJIAL4AAAACZKKEQC6CNEUAA (172.31.47.1:411)", file "Видео\клипы\"
NSFDEBUG:: findHub - ipPort - "172.31.47.1:411", ip - "172.31.47.1", port - "411"
NSFDEBUG:: findHubForCycle - getIp - "10.1.1.100", ip - "172.31.47.1", getPort - "411", getHubUrl - "dc.ganjanetwork.org.ru"
NSFDEBUG:: findHubEncoding - Charset Not Equal, Skipping - "CP1251" because "dc.ganjanetwork.org.ru"!=""
NSFDEBUG:: findHubEncoding - Going to System Charset - "UTF-8"
NSFDEBUG:: SearchonData2 encoding "UTF-8", hubname "TTH:GD22GA5SUUJAFCUXJIAL4AAAACZKKEQC6CNEUAA", nick - "[Citycomm]zamamam", file "\\"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.