The initial bug is (bug#888): https://winscp.net/tracker/show_bug.cgi?id=888 and it is stated that it was fixed for v5.0.8
The version i use is 5.1.4 (build 3020) on Windows 7 Ultimate 64Bit
Not sure if it is an edge case, so i will post some more info
The files i upload have .vbhtml extension (these are asp.net mvc 3 razor view files) and contain html and asp.net razor code (text)
These files lose their BOM (Byte-Order-Mark) char(s) at the beginning of the file. (this causes the browsers to misinterpret their contents)
If i rename the files to .bin and upload them they get transferred fine (obviously as binary) so i understand that the problem occurs with text files.