We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27444 ☆ A M B ☆
    • 117 Posts
    Hi,

    I am accessing Stored Procedures through MODX Evo 1.0.14 using a snippet to get data and display on the website.

    All data is showing correctly. The only problem is that when I get the following character through the SP: ’ and I display it, it is being replaced with �.

    I have tested the SP outside of MODX and the ’ character is actually displaying, so when being parsed through MODX the problem is being encountered.

    Has anyone encountered this problem before and managed to solve it?

    Thanks smiley

    This question has been answered by Jako. See the first response.

      Steven James McLean
      Tech Lead
      springbokagency.com
      • 36613
      • 328 Posts
      You use ajax for display this data ?
        • 27444 ☆ A M B ☆
        • 117 Posts
        Hi critianb88,

        No I'm not using Ajax to display the data.

        PHP in a snippet calls data from an SP and then use echo to display it on the page.
          Steven James McLean
          Tech Lead
          springbokagency.com
          • 36613
          • 328 Posts
          Ok your database charset is equal to site charset ?
            • 27444 ☆ A M B ☆
            • 117 Posts
            Hi Cristianb88,

            In this case I am not using our database as we are outputting directly from the SP and the page is not cacheable.

            Does this still affect?
              Steven James McLean
              Tech Lead
              springbokagency.com
            • discuss.answer
              • 13428 ☆ A M B ☆
              • 1,031 Posts
              You have to get the charset of the SP output and after that you should do an iconv/mb_convert_encoding to the site charset in your code.
                • 27444 ☆ A M B ☆
                • 117 Posts
                Jako's answer worked. Thanks a million!
                  Steven James McLean
                  Tech Lead
                  springbokagency.com