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 "\\"
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: TO3B7Q7OSQ4BXZW HA4WQPRPXZEUQKF FFW5UZLZQ (10.151.96.60 :411)", file "клипы\lordi Фрагмент 15.mp4" k.org.ru" k.org.ru" !="" 4BXZWHA4WQPRPXZ EUQKFFFW5UZLZQ" , nick - "[beeline]bazilio", file "\lordi 15.mp4" GD22GA5SUUJAFCU XJIAL4AAAACZKKE QC6CNEUAA (172.31.47.1:411)", file "Видео\клипы\" k.org.ru" k.org.ru" !="" JAFCUXJIAL4AAAA CZKKEQC6CNEUAA" , nick - "[Citycomm] zamamam" , file "\\"
NSFDEBUG:: SearchonData IP "", buf - "$SR [beeline]bazilio клипы\lordi Фрагмент 15.mp463809913 3/5TTH:
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.ganjanetwor
NSFDEBUG:: findHubEncoding - Charset Not Equal, Skipping - "CP1251" because "dc.ganjanetwor
NSFDEBUG:: findHubEncoding - Going to System Charset - "UTF-8"
NSFDEBUG:: SearchonData2 encoding "UTF-8", hubname "TTH:TO3B7Q7OSQ
NSFDEBUG:: SearchonData IP "", buf - "$SR [Citycomm]zamamam Видео\клипы 15/15TTH:
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.ganjanetwor
NSFDEBUG:: findHubEncoding - Charset Not Equal, Skipping - "CP1251" because "dc.ganjanetwor
NSFDEBUG:: findHubEncoding - Going to System Charset - "UTF-8"
NSFDEBUG:: SearchonData2 encoding "UTF-8", hubname "TTH:GD22GA5SUU