Solved

IE encoding GET String false

Posted on 2013-01-25
4
148 Views
Last Modified: 2014-04-24
Hi Experts:

I am getting GET parameters from the URL. The customer then logs in and after that the redirection sends the customer to the place where they originally want to go.

URL: http://anywhere/index.php?search=rüssel

for ($_GET as $key => $value)
{
$location .= "&" . $key . "=" . $value;
}

echo $location;

Open in new window


In FF you get the expected output:
&search=rüssel

In IE I get this:
search=r¿ ssel

(the ¿ is actually a square just could not type it here)

Any ideas what is happening here? When I redirect to the next page with the location, I am getting the false character in the URL, thus the search is not working....
0
Comment
Question by:kracklt
[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
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38820834
Are you using a defined character set on the page like 'utf-8' and using the same character set in PHP?

PS: I believe utf-8 is the default in Firefox and Windows-1252 is the English default in IE.
0
 

Author Comment

by:kracklt
ID: 38820858
Hi:

Yes. I am using UTF-8. I could not figure out a solution yet. All I can think of is to call the URL URL-encoded using UTF8 (never knew there was a switch for UTF8 urlencoding...)

Any other ideas?
Thomas
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38820962
It would be in a 'meta' tag in the <head> section.  This page you are reading has:

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

And in PHP look here:
http://php.net/manual/en/control-structures.declare.php#control-structures.declare.encoding
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 38821628
anything non-7-bit-US-ASCII will be transmitted URL-encoded, it's the browser's choice which character set is used and then being encoded

I'm not sure if the met buta tag will help, it may help, but I guess it will not always 'cause there is also the contenttype HTTP header which contains a charset and also the form tag which may contain a charset attribute
If any of these "definition places" differ from another one, all browsers switch to quirks mode and do something proprietary, means somthing except well known standard

I suggest that you properly encode your values in the page and don't rely on browser functionality
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

749 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