The File page outputs an invisible Unicode directional character ("Left to Right Mark" or its counterpart) just after the link to the raw file, with no space intervening.
That's, for instance, here on line 479 of ImagePage.php (r73636):
This means that when a user copies the filename from that link in order to paste it into a wiki page, the invisible character is pasted as well. This can cause problems in the wiki page and is hard to troubleshoot because the offending character is invisible.
I don't know anything about bidirectional text, so I don't have a patch, but can't that mark be separated from the link text, or even converted into an html attribute or something?