title: Widestring to string conversion in Delphi 7
body: <p>my app is a non-unicode app written in Delphi 7.</p>
  
  <p>I'd like to convert unicode strings to ANSI with this function :</p>
  
  <pre><code>function convertU(ws : widestring) : string;
  begin
    result := string(ws);
  end;
  </code></pre>
  
  <p>I use also this code to set the right codepage to convert.</p>
  
  <pre><code>initialization
    SetThreadLocale(GetSystemDefaultLCID);
    GetFormatSettings;
  </code></pre>
  
  <p>It works great in the VCL main thread but not in a TThread, 
  where I get some questions marks <strong>'?'</strong> as result of function <strong>convertU</strong>.</p>
  
  <p>Why not in a TThread ?</p>