I have a single PHP file which makes a bootstrap of Drupal 7. The code is below. When I try to use pathauto_clean_string in a spanish string with accents (á é ... , etc.) it deletes the character instead of removing the accent using transliteration module (also affects other special chars, obviously). I have included also this module in the bootstrap but cannot have the PHP script to behave exactly as the Drupal site, which is doing properly the transliteration in file names and also from my own custom module.
define('DRUPAL_ROOT','/home/example.com/public_html'); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; require_once DRUPAL_ROOT . '/sites/all/modules/transliteration/transliteration.inc'; require_once DRUPAL_ROOT . '/sites/all/modules/pathauto/pathauto.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); if(isset($_GET['string'])) echo pathauto_cleanstring(urldecode($_GET['string']));
Result with www.example.com?string=está-cañón : est-can
Result with the same string and module, same function and correct, expected, result: esta-canon