Transliteration

smk-ka - December 9, 2007 - 11:57
Transliteration of upload filenames

This module provides a central transliteration service for other Drupal modules, as well as sanitizing of file names during uploads.

Generally spoken, it takes Unicode data and tries to represent it in US-ASCII characters (i.e., the universally displayable characters between 0x00 and 0x7F). The representation is almost always an attempt at transliteration — i.e., conveying, in Roman letters, the pronunciation expressed by the text in some other writing system.

Another purpose is to clean filenames during upload: Drupal 5 didn't take care of invalid (according to RFC 2396) and non-ASCII characters in filenames, which could break file attachments, image uploads, etc.
While Drupal 6 and later are not affected by this issue, cleaning filenames still might make sense from an esthetic point of view.

According to Unidecode, from which most of the transliteration data has been derived, "Russian and Greek seem to work passably. But sometimes the output is very dirty: it works quite bad on Japanese and Thai."

If you would like to help make transliteration better, the following sources might act as a starting point: CLDR — Unicode Common Locale Data Repository, especially the Guidelines and available transliteration charts.

Installation

Please see current README.

Roadmap

Planned features for the next major version (3.x):

  • New developer-friendly transliteration data file layout
  • Lower memory footprint of replacement function
  • Make filename cleaning optional.

Credits

Authors:

  • Stefan M. Kudwien (smk-ka)
  • Daniel F. Kudwien (sun)

UTF-8 normalization is based on UtfNormal.php from MediaWiki and transliteration uses data from Sean M. Burke's Text::Unidecode module.

Sponsor:

UNLEASHED MIND
Specialized in consulting and development of Drupal powered sites, our services include installation, development, theming, customization, and hosting to get you started.

Releases

Official releasesDateSizeLinksStatus
6.x-2.12009-Jun-0997.26 KBRecommended for 6.xThis is currently the recommended release for 6.x.
5.x-2.12009-Jun-0997.16 KBRecommended for 5.xThis is currently the recommended release for 5.x.
Development snapshotsDateSizeLinksStatus
6.x-3.x-dev2009-Jun-29100.15 KBDevelopment snapshotDevelopment snapshots are automatically regenerated and their contents can frequently change, so they are not recommended for production use.


 
 

Drupal is a registered trademark of Dries Buytaert.