Active
Project:
Drupal core
Version:
main
Component:
file system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2026 at 17:49 UTC
Updated:
15 Sep 2026 at 09:09 UTC
Jump to comment: Most recent
Follow up to https://www.drupal.org/project/drupal/issues/3562543#comment-16769882
\Drupal\file\EventSubscriber\FileEventSubscriber::coerceToValidUtf8 (assuming that lands) and very similar code in \Drupal\Component\Transliteration\PhpTransliteration::transliterate should be refactored to a public static in \Drupal\Component\Utility\Unicode
Note: the newer implementation in coerceToValidUtf8() has advantages over the hash approach in transliterate() - likely we'd want to use the former here.
Comments
Comment #2
mcdruid commentedComment #3
longwaveInstead of the hash approach to replace unknown characters, mbstring provides a function - sample code: