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

Encoding problem in contextual help loaded using Ajax

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      In the "Advanced Search", the contextual help about how to use the "%" wildcard returns char data without an encoding. For example, in French, this means that accentued characters show strange since the text is in UTF-8 but most browsers default on ISO-8859-1.

      I fixed my installation with the following modification:

      return "<div class='crm-help'>" . mb_convert_encoding($text,'HTML-ENTITIES', 'UTF-8') . "</div>";

      in file CRM/Core/Smarty/plugins/block.htxt.php, line 49.

      Altough the headers of the ajax reply showed (in Firebug) that the web server was responding: «Content-Type: text/html; charset=iso-8859-1», so this could also be the source of the problem. However, I couldn't find in the Civicrm source where the content-type headers were generated. Is it possible that ajax.php is not replying any Content-Type header at all?

      mathieu, aka "bgm" on #civicrm

        Attachments

          Activity

            People

            • Assignee:
              shailesh Shailesh Lende
              Reporter:
              mlutfy Mathieu Lutfy
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: