发布包含&pound的json字符串;

I have a VB6 application that is creating a JSON string and posting it to a website (PHP5). It may look like this:

data=thisisthejsonstringitcontainsthe£hmtlcharacter&code=123&api_key=321

This is an issue because the £ is thought to be the start of a new variable so the json string is being cut.

Does this need to be encoded somehow at the VB source? Or can I do something with this when it arrives at the website? If it needs encoded by VB can anyone suggest a suitable function?

I'm using the application/x-www-form-urlencoded content type when posting.

This might seem far fetched, but have you tried sending &pound urlencoded beforehand? being %26pound

If you send url arguments to a webserver, you'll need to urlencode them. That's true for all arguments in formats that don't escape and can contain problematic characters themselves, which includes JSON.