web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Encoding special characters

(0) ShareShare
ReportReport
Posted on by 1,540

I'm getting an error with some special characters being encoded when passed to the API.

I have a portal in PHP that passes information to the CRM via https://org.crm4.dynamics.com/XRMServices/2011/Organization.svc

The character giving an error is £ which is in the xml as £

I'm using htmlspecialchars($_POST["desc"],ENT_QUOTES, "UTF-8"); to encode it.

What is the best way to handle this?

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    abhishek_255 Profile Picture
    1,614 on at

    Please replace

    £ to £ and

    & to & and check.

    Best Regards,

    Abhishek

  • Suggested answer
    abhishek_255 Profile Picture
    1,614 on at

    Hi,

    Please replace  Â£ to £ and & to & and check.

    Best Regards,
    Abhishek

  • Verified answer
    ChrisJC Profile Picture
    1,540 on at

    Thanks, removing the additional parameters to htmlspecialcharacters() works, leaving the £ as £ but still encoding <> etc.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans