-function set_alias_names(&$sn_new, $sn_old, $update_new = false, $new_alias = null)
+/** Transform a name to its canonical value so it can be compared
+ * to another form (different case, with accents or with - instead
+ * of blanks).
+ * @see compare_basename to compare
+ */
+function name_to_basename($value) {
+ $value = mb_strtoupper(replace_accent($value));
+ return preg_replace('/[^A-Z]/', ' ', $value);
+}
+
+/** Compares two strings and check if they are two forms of the
+ * same name (different case, with accents or with - instead of
+ * blanks).
+ * @see name_to_basename to retreive the compared string
+ */
+function compare_basename($a, $b) {
+ return name_to_basename($a) == name_to_basename($b);
+}
+
+function set_alias_names(&$sn_new, $sn_old, $pid, $uid, $update_new = false, $new_alias = null)