Changes between Version 3 and Version 4 of Ticket #7484, comment 3
- Timestamp:
- 04/27/2017 01:08:15 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7484, comment 3
v3 v4 1 1 The problem is mostly with WordPress not properly converting utf-8 filenames to an ASCII version. 2 2 3 See #WP22363, #WP 15955.3 See #WP22363, #WP24661, #WP15955. 4 4 5 5 We can wait for WordPress to fix this or we can put in a temporary fix. … … 7 7 `iconv.patch` will try to convert any utf-8 characters in the filename to their ASCII equivalent. This should fix the immediate issue with our uploader class, but relies on `iconv`, which might not be available and is a little finicky depending on the system. 8 8 9 Could try using `mb_convert_encoding()` as well. 9 Could try using `mb_convert_encoding()` as well. Or if `remove_accents()` worked properly, we could do the following: 10 10 11 A better method would be using URLify against our filenames: 11 `add_filter( 'sanitize_file_name', 'remove_accents' );` 12 13 An alternative method would be using URLify against our filenames: 12 14 https://github.com/jbroadway/urlify#usage 13 15