title: Unicode Character in Core Graphics
body: <p>I have an iPad app where I am storing some unicode (non-ASCII) data in a SQLite DB.  Later, I retrieve that data and need to write it to a pdf. All ASCII data does fine, but the unicode data is presenting as "encoded characters"</p>
  
  <p>The process goes like this:
  Retrieve the data and write it to the console.  This goes fine.  Here is the output to the console:  LOOKUP:↑ to enable all activities:FOR:COORDINATIONGOAL:</p>
  
  <p>(The little up arrow is my unicode character)</p>
  
  <p>At this point, the data is stored in an NSString.  So next, I convert it to a char so I can use it in core graphics:</p>
  
  <pre><code>NSString *t = [data objectForKey:pi.persistencekey];
  char *text = " ";
  
  if ([t length] &gt; 0) {           
    text = [t UTF8String];            
  }
  
  CGContextShowTextAtPoint (pdfContext,  pi.x, pageRect.size.height - pi.y, text, strlen(text));
  </code></pre>
  
  <p>The PDF generates fine, but the text generated shows strange characters where the up arrow is supposed to be.</p>
  
  <p>I have tried other decoding methods and none work.</p>
  
  <p>Thanks in advance for any help. </p>