Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24292

Extract template operator(s) do not work correctly with utf8 strings

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2014.11
    • Legacy stack
    • N/A

    Description

      Hello,

      We write today to share a bug for a problem which was brought up in the share.ez.no forums: http://share.ez.no/forums/developer/extract-returns-garbage-when-result-contains-special-chars

      It seems that we found several template operators like the extract, extract_right and extract_left which are not utf8 string friendly.

      Steps to reproduce

      Edit a default execution template like, pagelayout.tpl

      Add tpl code to the above template, save your changes and clear all caches,

      {"Håmel"|extract(1,1)}

      Reload the page and notice that the output of the extract template operator is a garbage character and not the extracted contents of the passed utf8 template operator input string.

      The above code should return "å". But instead it returns a garbage char (�).

      We are preparing a PR to address the underlying issue and solve this problem.

      Cheers,
      Brookins Consulting

      Attachments

        Activity

          People

            Unassigned Unassigned
            bc bc
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: