Solved

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

Posted on 2011-03-04
10
424 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 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 110

Expert Comment

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

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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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 110

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 110

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 110

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MySQL limit and not so limited 13 60
splitting a sting into elements 6 69
A responsive image gallery using flexbox 6 76
e commerce steps shown instead of self testing 2 56
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
The viewer will learn how to count occurrences of each item in an array.

732 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