I want to send the £ symbol without utf-8 encoding

Invalid request encoding. Please use utf-8 encoding and eliminate any non utf-8 encoding

in request content.

I want to send the £  symbol without utf-8 encoding
LVL 1
rgb192Asked:
Who is Participating?
 
gr8gonzoConnect With a Mentor ConsultantCommented:
The £ symbol usually doesn't need UTF-8 encoding, so there may be some other data in your request that needs to be encoded. That said, you should be able to just wrap utf8_encode(".... your data here ....") around the value you're sending.

Encoding the value should not harm the data in any way. It just sends the same data in a way that the other system can understand.
0
 
Ray PaseurCommented:
Isn't there an HTML entity for that?  Something like £
0
 
Ray PaseurConnect With a Mentor Commented:
This works. http://www.laprbass.com/RAY_temp_rgb192x.php
<?php // RAY_temp_rgb192x.php
error_reporting(E_ALL);


echo "&pound; CDATA &#163;";

Open in new window

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
gr8gonzoConsultantCommented:
@Ray - Yeah, but my guess is that the pound symbol isn't the problem, since you don't need UTF-8 encoding to send that character (it's a normal ASCII character).
0
 
Ray PaseurCommented:
You might also want to read the man page here:
http://www.php.net/manual/en/language.types.string.php

and the very well written article here:
http://www.joelonsoftware.com/articles/Unicode.html

0
 
Ray PaseurCommented:
Right, Jonathan.  For some reason people often think they need to use UTF-8 when ISO-8859-1 works just fine.  I've only found UTF-8 to be necessary when I am dealing with Chinese.  For western languages, the 256 ASCII character are usually enough.  We've got Euro signs, umlauts, all kind of good stuff up there above the 127-line.
0
 
gr8gonzoConsultantCommented:
Actually, any Asian language, for that matter. :) Also, MS Office likes to use auto-formatting characters that fall outside the normal ASCII range of things, which is another pretty common scenario. Seen lots of people editing CSVs with Excel and introducing such characters into the mix.
0
 
Ray PaseurCommented:
Interesting - I have never hit that in MS Office, so I'll be on the lookout.  Thanks for the tip!
0
 
gr8gonzoConsultantCommented:
Yep. Office's replacement for the normal dash - character is a hard one to spot because they look almost identical (except Microsoft thought that an extra pixel of length was worth a character that took up another 2 bytes)
0
 
rgb192Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.