It's completely possible that an abbreviation could have an accented character. For example, the French for US is,
<abbr title="États-Unis">É.-U.</abbr>

Currently, this gives the error:

Cannot add abbreviation. É.-U. contains invalid characters.

Comments

rob_johnston’s picture

Issue summary: View changes
rob_johnston’s picture

There's a preg_match test here that can be updated to allow utf:
http://drupalcode.org/project/abbrfilter.git/blob/refs/heads/7.x-1.x:/ab...

Changing it to use the PCRE_UTF8 modifier, i.e. from
elseif (preg_match('/^[\w][\w\.~\/\-]+$/', $row->abbrs) == FALSE) {
to
elseif (preg_match('/^[\w][\w\.~\/\-]+$/u', $row->abbrs) == FALSE) {
solves the problem but, from a quick reading, I don't think that this works on all platforms.

Maybe it would be better to use the function "drupal_validate_utf8?

rob_johnston’s picture

Status: Active » Closed (duplicate)

The fix has been included in the patch for #2175987: Different abbreviations for different languages.

rob_johnston’s picture

Status: Closed (duplicate) » Active