I managed to compile libssh successfully, but I am not sure if it actually is compiled with unicode support. I say this because the utf8 patch does not fix this bug.
My friend Mike Frederick expressed interest in helping me, so here are all the details of how I built:
As mentioned in bug 474, I am using this build of mingw 4.8.2, which QT 4.8.6 wants: http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Wi...
I am using CMake 2.8.12.2 (the latest 2.x version): http://www.cmake.org/files/v2.8/cmake-2.8.12.2-win32-x86.exe
openssl 1.0.1i http://slproweb.com/download/Win32OpenSSL-1_0_1i.exe
zlib 1.2.8 http://zlib.net/zlib128-dll.zip
These are the CMake options I specified: CMAKE_CXX_FLAGS:STRING=-DUNICODE -D_UNICODE CMAKE_C_FLAGS:STRING=-DUNICODE -D_UNICODE CMAKE_EXE_LINKER_FLAGS:STRING=-municode CMAKE_MODULE_LINKER_FLAGS:STRING=-municode CMAKE_SHARED_LINKER_FLAGS:STRING=-municode CMAKE_STATIC_LINKER_FLAGS:STRING=-municode WITH_EXAMPLES:BOOL=OFF (In addition to specifying ZLIB_ROOT_DIR)
The exact source I am using is this tarball: http://code.x2go.org/releases/source/libssh-modified-by-x2go-project/libssh-...
Which is libssh-0.6.3 with these 2 patches applied: http://code.x2go.org/releases/source/libssh-modified-by-x2go-project/impleme... http://code.x2go.org/releases/source/libssh-modified-by-x2go-project/libssh-...