Found strange bug in filenames displaying after reconnect.
Steps to reproduce.
Step 1.
Centos 6.6 webserver, locale: LANG=ru_RU.UTF-8
putty session, Remote charset is UTF-8 (Window -> Translation)
let's create file with russian letters in filename:
cd /www/mysite1.ru/www/
echo utf8 > Файл1.txt
ls -a
. .. Файл1.txt
That's good. Open firefox, see http:// mysite.ru/Файл1.txt - it showed correctly, here is nginx's access_log:
x.x.x.x - - [18/Jun/2015:18:13:29 +0300] "GET /%D0%A4%D0%B0%D0%B9%D0%BB1.txt HTTP/1.1" 200 5 "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0"
Step 2.
Windows 8.1 workstation, russian codepage (cp1251) installed. WinSCP 5.7.4 5553, portable edition with default settings. Used protocol - SFTP.
Let's create file with russian letters in filename, for example - Файл2.txt
Open /www/mysite1.ru/www folder, then create subfolder winsp_uploaded and copy our Файл2.txt to this subfolder.
Open firefox, still OK.
Step 3.
Let's create an file with bad encode on unix server (i've copied the ones from old hosting via winscp < 5.1.7)
cd /www/mysite1.ru/www/
mkdir bad_file
cd bad_file
echo utf8 > Файл3.txt
convmv -futf8 -tcp1251 * --notest
mv "./Файл3.txt" "./▒▒▒▒3.txt"
Ready!
So.
Open winscp, then:
1. open folder /www/mysite1.ru/www/ - filename looks good. It's OKAY.
2. open folder /www/mysite1.ru/www/bad_file - filename looks... good. Hmm.. OK.
3. Go up to /www/mysite1.ru/www/ and press Ctrl+R (or wait for reconnect) -- and filename in /www/mysite1.ru/www/ is shown as Файл1.txt Why??