Answer the question
In order to leave comments, you need to log in
Russian file names on the web server?
Hello!
I deployed LAMP on my ubuntu server - wordpress is on it.
When uploading media files with Russian names, they are successfully uploaded and displayed, but on the server in the names of krakozyabry: /2015-05-06-12-37-53-Рабочий-стоР".png
Prompt how to fix ?
charset.conf in /etc/apache2/conf-enabled and conf-available added: AddDefaultCharset UTF-8
to php.ini where possible - changed to UTF-8 - but no use.
Thank you!
Answer the question
In order to leave comments, you need to log in
File names in Cyrillic are bad, even if everything works wonderfully on a specific one, there is a non-sour chance that they will crash during transfer.
Connect any transliteration and hang on sanitize_file_name
after that, the file will be processed by it during loading and change the name to a name in Latin
This is bad manners. It is not necessary to either download Russian names or store them.
When uploading files, rename to Latin.
// UPD
Rename already using PHP on the server, and put instead of 2015-10-09_na_more.jpg 2015-10-09_na_more.jpg.
Just recently asked.
Does it make sense to leave files in Cyrillic when uploading to the server?
I do not agree that Google does not like Cyrillic. He loves her very much and there will be more traffic.
I agree that there may be problems with incorrect hosting settings. If not all mods are installed.
But if it is necessary to open the Cyrillic alphabet on the open server, then by welcome. Convert win1251 to UTF-8 and output.
<?
echo iconv('windows-1251', 'UTF-8', $FILE1251);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question