Is it right to encode "+" and "-" in that way?
<p>I am trying to encode string with UTF-8 format and all required characters instead of "+" and "-" are not formatted.</p>

<p>I investigated <code>NSCharacterSet</code>, and found out that standard <code>URLHostAllowedCharacterSet</code> method is not fully covering my issue.</p>

<p>I decide to create own NSCharacterSet with symbols that should be replaced:</p>

<pre><code> NSCharacterSet *customCharacterSet = [[NSCharacterSet characterSetWithCharactersInString:@" \"#%/:&lt;&gt;?@[\\]^`{|}+-"] invertedSet];
</code></pre>

<p>This is working, but I am interested if it is right to do this replacement by my own, or maybe there is some standard methods that are doing this replacements that I do not find?</p>