Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encoding issue using form

Status
Not open for further replies.

Buddyholly83

IS-IT--Management
Aug 7, 2005
23
GB
Hi guys and gals!

Been scratching my head about this for a week now and still don't have a solution.

I am making a form post to a web service using the following:

Code:
my $userAgent = new LWP::UserAgent;
		$userAgent -> timeout([10]);
		
		$response = $userAgent -> post($uri, 
			[
				Username => $username,
				Password => $password,
				Account => $account,
				Body => $body
			]
		);

It works fine for everything except when the $body value has a £ sign in it. The post converts the £ to %A3 - but for utf-8 url encoding £ should be converted to %C2%A3 because £ is outside the ASCII character set, and thus requires two bytes in UTF-8.

I think I need to change the charset the post uses to encode to ISO-8859-1 ?

Not sure what to do?!

Any help would be greatly appreciated! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top