title: How to remove the degrees celsius symbol from a string (java)
body: <p>I've been trying to remove the degree Celsius symbol from the following string for a few hours now. I've looked at prior posts and I see that /u2103 is the unicode representation for it. Despite trying to remove that string, I've still had no luck. Here's what I have now:</p>
  
  <pre><code>String temp = "Technology=Li-poly;Temperature=23.0 &lt;degree symbol&gt;C;Voltage=3835";
  StringBuilder filtered = new StringBuilder(temp.length()); 
      for (int i = 0; i &lt; temp.length(); i++) {
  char test = temp.charAt(i);
  if (test &gt;= 0x20 &amp;&amp; test &lt;= 0x7e) {
      filtered.append(test);
  }
  }
  
  temp = filtered.toString();
  
  temp.replaceAll(" ", "%20");
  </code></pre>
  
  <p>The resulting string looks like this:
  Technology=Li-poly;Temperature=<strong>23.0 C</strong>;</p>
  
  <p>I've also tried </p>
  
  <pre><code>temp.replaceAll("\\u2103", "");
  temp.replaceChar((char)0x2103, ' ');
  </code></pre>
  
  <p>But none of this works.</p>
  
  <p>My current problem is that the function to filter the string leaves a blank space but the call to replaceAll(" ", "%20") doesn't seem to recognize that particular space. ReplaceAll will replace other spaces with %20.</p>