Issue for Author name : Ágnes Garai
To get initial from author first name i.e Ágnes, I use
$first_name_initial = nlmfield_process_pattern('field_NAME', 'F', $author['xml']);
And nlmfield_process_pattern function return question mark character.

Result : �. Garai

Comments

suhel.rangnekar’s picture

substr does not work with multibyte characters (i.e special character like Á). so
replacing substr to mb_substr to handle special character.
Submitting a patch for this issue.

suhel.rangnekar’s picture

Title: nlmfield_process_pattern function return question mark character for first initial( �. Garai) » nlmfield_process_pattern function return question mark character for name first initial( �. Garai)
suhel.rangnekar’s picture

StatusFileSize
new1.35 KB

Refactoring the patch.
Please find latest attached patch.( nlmfield-replacing_substr_to_mb_substr-2354069-3.patch )

rahul.shinde’s picture

Instead of mb_string i will make use of drupal_substr(). Because we are targeting large audience, and there might be chances people tends to set UNICODE_MULTIBYTE to 0.
Attaching patch for this changes.

danmcewan’s picture

Good catch rahul.

  • rahul.shinde committed 9ce1970 on 7.x-1.x
    Issue #2354069 by suhel.rangnekar, rahul.shinde: Fixed...
rahul.shinde’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.