title: Internet Explorer doesn't handle html encoding in URL (GWT)
body: <p>Using GWT, I've got a webapp, and on a certain page it pulls a parameter from the URL that has the pipe character (|) encoded. So, for example, the full URL would be (in dev mode):</p>
  
  <pre><code>http://127.0.0.1:8888/Home.html?gwt.codesvr=127.0.0.1:9997#DynamicPromo:pk=3%257C1000
  </code></pre>
  
  <p>and when I pull the parameter "pk" I should get "3|1000". (%257C is the encoded pip char)</p>
  
  <p>Well, this works just fine in Firefox and Chrome. </p>
  
  <p>In IE (I'm using 11), I get "3%7C1000" when I pull the parameter. For whatever reason, IE drops the 25 in the encoded character, meaning it's no longer a pipe char and my app breaks.</p>
  
  <p>I've read around and found that encoding issues are common on IE. In particular, I found this page: <a href="http://support.microsoft.com/kb/928847" rel="nofollow">http://support.microsoft.com/kb/928847</a></p>
  
  <p>It's suggested solutions include:</p>
  
  <ul>
  <li>Disable the Auto-Select setting in Internet Explorer.</li>
  <li>Provide the character set in the HTTP headers.</li>
  <li>Move the META tag to within the first kilobyte of data that is parsed
  by MSHTML.</li>
  </ul>
  
  <p>I've tried those 3 and it didn't help. Here is the beginning of my Home.html:</p>
  
  <pre><code>&lt;!doctype html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge" /&gt;    
      &lt;meta http-equiv="content-type" content="text/html;charset=utf-8" /&gt;
  </code></pre>
  
  <p>The other two suggestions:</p>
  
  <ul>
  <li>Increase the size of the server's initial HTTP response. The initial
  size should be at least 1 KB.</li>
  <li>Make sure that the System Locale setting matches the character set of
  the META tag that is specified in the HTML page.</li>
  </ul>
  
  <p>I don't feel will do anything. My system locale settings are correct. And since my meta tags are at the beginning of the document, they are within the first kilobyte of data, so they would be read first. So I don't see why I'd need to increase the HTTP response size.</p>
  
  <p>So, I need IE to properly read this encoded character for the web application to work properly. Does anyone have any other suggestions I could try?</p>
  
  <p>UPDATE:</p>
  
  <p>How the URL is encoded:</p>
  
  <pre><code>URL.encodePathSegment(place.getValue())
  </code></pre>
  
  <p>Where URL is from the package <a href="http://www.gwtproject.org/javadoc/latest/com/google/gwt/http/client/URL.html#encodePathSegment%28java.lang.String%29" rel="nofollow">com.google.gwt.http.client</a></p>
  
  <p>getValue() is set from this:</p>
  
  <pre><code>public static String encodePk(PrimaryKey pk)
  {
      if(pk != null)
      {
          return String.valueOf(pk.getPk()).concat("|").concat(String.valueOf(pk.getCpk()));                    
      }
      else{
          return "";
      }        
  } 
  </code></pre>
  
  <p>The final result is the url I posted at the top:</p>
  
  <pre><code>http://127.0.0.1:8888/Home.html?gwt.codesvr=127.0.0.1:9997#DynamicPromo:pk=3%257C1000
  </code></pre>
  
  <p>Where the part after "pk=" is the encoded string.</p>