Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-2211

Mailing Labels: UFPDF does not display properly right-to-left (sub-)strings

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.8
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None

      Description

      UFPDF does not have support for right-to-left strings (like strings in Hebrew), which means the generated mailing labels have Hebrew strings reversed (i.e., printed char-by-char from left to right).

      Unless there's a way to convince UFPDF to work with Hebrew strings, an uglish hack can be doing something like

      preg_match_all('/(\d+)?./us', $line, $ar);
      $line = join('',array_reverse($ar[0]));

      for every line that's Hebrew (or Arabic, or any other right-to-left script) only. Otherwise, something to find right-to-left string boundaries has to be found and only the rtl substring reversed. (Note: In PHP, strrev() does not work for UTF-8 characters.)

      Maybe, just maybe, the U+202B (right-to-left embedding) and U+202C (pop directional formatting) or the U+202E (right-to-left override) and U+202D (left-to-right override) Unicode characters can be used for this, but I doubt they would work in UFPDF.

      The relevant forum thread is at http://forum.civicrm.org/?topic=886

        Attachments

          Activity

            People

            • Assignee:
              shailesh Shailesh Lende
              Reporter:
              shot Piotr Szotkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: