User tests: Successful: Unsuccessful:
Redo of #16878 for J4 as we do not have the same problems.
#16878 (comment)
Similar to #27974 but for media files upload
It takes advantage of the PHP extension intl
when it is enabled to use the transliterator_transliterate()
method, itself using ICU
library.
The php extension is available since php 5.4.0, but may not be enabled on some hosts.
If disabled, former behavior is used which does not accept to upload files with UTF8 names and displays an error. This PR is therefore totally BC.
Using iconv
and IGNORE
let's get rid of some prime-characters that can't be transliterated, like the Cyrillic letter ь
.
Check in System Information => PHP Information that the extension is enabled:
You should get something like this:
If it is not enabled on your local environment, try to modify your PHP.ini.
Change an image file name to utf8.
I used here '完 成'".png
to be sure we also get rid of unwanted characters.
Go to Media Manager =>Upload, select the file and click upload.
In the case above I get a pure ascii name wan-cheng.png:
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-21 10:50:48 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thankyou!
Note: the possible messages in media manger need love & care.