Solved

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

Posted on 2011-03-04
10
417 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
  • 5
  • 4
10 Comments
 
LVL 34

Accepted Solution

by:
gr8gonzo earned 250 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 109

Expert Comment

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

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 34

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 109

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 109

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 34

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 109

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 34

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

831 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