OK I've searched all related questions, and source code where available, just stuck. I'm using this code from a related question: How to calculate the hash value of a torrent using Java
to build the SHA-1 hash.
Then I'm doing this to encode it, to be included in the tracker request:
URLCodec c = new org.apache.commons.codec.net.URLCodec(); return new String(c.encode(info_hash));
But the tracker replies with no peers. By tracing uTorrent, I can see the correct hash for my torrent file is: T%7f%bc%a6%92%bb%8a%8b%2aL%b9%a3%0f%a59%f3%98%e6%0c%eb
But my code outputs: %E4%AF%3C%96%9E%D2%BAJt%C0%C3%B4%12%93%D4h%3B%9A%2CF
Any ideas why this won't work?
I use C# , you can read my blog for more detail http://hello.xiaoyezi.xyz/urlencode-the-info_hash.html