title: Defining a string as char* vs unsigned char*
body: <p>I am using the <a href="https://www.pcre.org/current/doc/html/pcre2api.html" rel="nofollow noreferrer">pcre2</a> library, and it has a special 'string-type' defined as <code>PCRE2_SPTR8</code>.</p>
  <p>If I try and initialize a string with something like:</p>
  <pre><code>PCRE2_SPTR8 s =   &quot;my string&quot;;
  </code></pre>
  <p>I'll get a warning such as:</p>
  <pre><code>warning: initializing 'PCRE2_SPTR8' (aka 'const unsigned char *') 
           with an expression of type 'char [27]' converts between pointers to
           integer types with different sign [-Wpointer-sign]
  </code></pre>
  <p>What would be the suggested way to initialize this type of string? Doing something like:</p>
  <pre><code>PCRE2_SPTR8 s =   (PCRE2_SPTR8) &quot;my string&quot;;
  </code></pre>
  <p>Additionally, out of curiosity why is a normal &quot;string&quot; usually defined as <code>char* string = &quot;something&quot;;</code> instead of <code>unsigned char* string = &quot;something&quot;;</code>. Is there any advantage/disadvantage of defining a string with a signed vs. unsigned char?</p>