I moved my website from one server to another and encounter a problem with cyrillic filenames. Some cyrillic URLs in wordpress are fine and some are now broken. It used to be OK on previous server.
Here's what it looks like: in wordpress images library I see an image broken, with URL: /wp-content/uploads/2013/11/олимпийские-новогодние-шары.jpg
(URL-encoded version: /wp-content/uploads/2013/11/%D0%BE%D0%BB%D0%B8%D0%BC%D0%BF%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B5-%D0%BD%D0%BE%D0%B2%D0%BE%D0%B3%D0%BE%D0%B4%D0%BD%D0%B8%D0%B5-%D1%88%D0%B0%D1%80%D1%8B.jpg
)
I navigate to this URL and see 404 error.
Then I go to FTP, copy filename from there (олимпийские-новогодние-шары.jpg
) and navigate to URL /wp-content/uploads/2013/11/олимпийские-новогодние-шары.jpg
(URL-encoded version: /wp-content/uploads/2013/11/%D0%BE%D0%BB%D0%B8%D0%BC%D0%BF%D0%B8%D0%B8%CC%86%D1%81%D0%BA%D0%B8%D0%B5-%D0%BD%D0%BE%D0%B2%D0%BE%D0%B3%D0%BE%D0%B4%D0%BD%D0%B8%D0%B5-%D1%88%D0%B0%D1%80%D1%8B.jpg
)
Now it works!
Once again:
олимпийские-новогодние-шары.jpg
- brokenолимпийские-новогодние-шары.jpg
- works.
It looks absolutely the same. Copy and paste URL above to check!
If I take a URL with working filename (copied from FTP or SSH) and replace Cyrillic filename from keyboard letter by letter, it goes fine (200 OK) until I change й
(copied from FTP) to й
- typed from keyboard/copied from wordpress.
It absolutely blows my mind! The same looking letter works in one case and doesn't in the other. And why й
and not another Cyrillic letter, like ш
or д
? Substitution of these letters (in filename copied from FTP) from keyboard doesn't produce the 404 error.
If we look closer, URL-encoded versions are not quite the same:
%D0%BE%D0%BB%D0%B8%D0%BC%D0%BF%D0%B8%D0%B8%CC%86%...
%D0%BE%D0%BB%D0%B8%D0%BC%D0%BF%D0%B8%D0%B9%D1%81%...
But why and how can I influence it?