• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 434
  • Last Modified:

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
0
rgb192
Asked:
rgb192
  • 5
  • 4
2 Solutions
 
gr8gonzoConsultantCommented:
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 PaseurCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now