title: Is there an alternative for --data-urlencode only for spaces?
body: <p>I want to create a GET request via CUrl with variables as a batch file. The problem so far has been that the variables can also contain spaces, which does not let the link open in the CMD window.</p>
  <p><code>curl -G &quot;http://192.168.0.100:1234/operations/get?token=abcde12345&amp;subject=var1 in here&amp;object=var2 in here&quot;</code></p>
  <p>I always got the error message bad/illegal format or missing link. Now I have solved the problem with --data-urlencode, however special characters which are contained are also encoded as URL text.</p>
  <p><code>curl -G &quot;http://192.168.0.100:1234/operations/get&quot; --data-urlencode &quot;token=abcde12345&quot; --data-urlencode &quot;subject=var1 in here&quot; --data-urlencode &quot;object=var2 has some spechial chars ö ß % &amp;&quot;</code></p>
  <p>My code works fine on this website <a href="https://reqbin.com/req/c-1n4ljxb9/curl-get-request-example" rel="nofollow noreferrer">https://reqbin.com/req/c-1n4ljxb9/curl-get-request-example</a> for testing and all special-characters arrive correctly, only in the CMD window it changes these to the url-code...</p>
  <p>Is there any way to replace the spaces with the usual &quot;%20&quot; but leave the special characters unchanged or has someone an alternative for this in the CMD-window? When I enter the URL with special characters in the browser manually, all characters arrive correctly and the spaces are replaced by themselves.</p>