<i>Use signed char for strings...</i><p>What? No.  Use plain &quot;char&quot; for strings (which may be signed or unsigned, depending on the environment).<p>If you use &quot;signed char&quot; in an environment where plain &quot;char&quot; is unsigned then a comparison like:<p><pre><code>  string[i] == &#x27;\xff&#x27;
</code></pre>
will be always false.