Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2011-03-04
10
Medium Priority
?
429 Views
Last Modified: 2012-05-11
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
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 1000 total points
ID: 35037241
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 35037242
Isn't there an HTML entity for that?  Something like £
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 35037275
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.

 
LVL 35

Expert Comment

by:gr8gonzo
ID: 35037279
@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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 35037295
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 35037347
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
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 35037391
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 35037604
Interesting - I have never hit that in MS Office, so I'll be on the lookout.  Thanks for the tip!
0
 
LVL 35

Expert Comment

by:gr8gonzo
ID: 35038175
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
 

Author Closing Comment

by:rgb192
ID: 35182354
thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question