Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files broken when filename contains russian characters #497

Closed
dimontajik opened this issue Dec 13, 2014 · 4 comments
Closed

Files broken when filename contains russian characters #497

dimontajik opened this issue Dec 13, 2014 · 4 comments
Labels

Comments

@dimontajik
Copy link

When you load music from the Russian name appears bug removed the name of the music and then the music is not played

2
3

@dimontajik dimontajik changed the title Bag music Bug music Dec 13, 2014
@luke-
Copy link
Contributor

luke- commented Dec 14, 2014

Does this problem only affects the music player?
Can you also tests images/files with this filename?

@luke- luke- added the Kind:BUG label Dec 14, 2014
@luke- luke- changed the title Bug music Music player broken when filename contains russian characters Dec 14, 2014
@dimontajik
Copy link
Author

and with pictures the same problem

@luke- luke- changed the title Music player broken when filename contains russian characters Files broken when filename contains russian characters Dec 14, 2014
@Vatarus
Copy link

Vatarus commented Apr 23, 2015

Вывод русских имен в прикрепленных файлах.
Вносим изменения в File.php (protected/modules_core/file/models)
public function sanitizeFilename()
{
setlocale(LC_CTYPE, 'ru_RU.UTF-8');
$this->file_name = trim($this->file_name);
$this->file_name = preg_replace("/[^a-zA-ZА-Яа-я0-9_()-s. ]/u", "", $this->file_name);
russian

@WASasquatch
Copy link
Contributor

Good work, Vatarus. make a pull. :D However you may not want to revert Latin to 0 bytes because I have noticed a lot of dual character filenames passed around. For example, lets say a video on a friend HumHub: "ру́сский_язы́к_(Russky_Yazyk)_Documentary.mp4"

So your fix may take some meaning away for duel-speaking citizens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants