shadowspan, thank you so much for your solution!
Although, for my filenames to
display correctly I had to removre all utf8_encode calls.
To sum it up.
For cyrillic filenames to show on the page, not lose the first word and be correctly downloaded,
including being hashed I did:
WARNING! I am not sure what gets broken this way!
in /core/components/filedownload/models/filedownload/filedownload.class.php
1. Add
setlocale(LC_CTYPE, 'ru_RU.UTF-8');
2. Replace
basename\((.*?)\) with
substr\(strrchr\($1,"/"\),1\)
3. Replace
utf8_encode\((.*?)\) with
$1 , meaning remove the function call leaving only the argument.