title: Delphi 10: What can I do about String[25] changing some char values to "?"
body: <p>I have ported a Delphi 7.1 application to Delphi 10.3.
  I have some simple encrypting/decryption functions.
  And if I encrypt string values and encrypt them, everything is fine:</p>
  <pre><code>var
     test, encrypted, decrypted : string;
  begin
    test := 'XXXXXXXX'; // hidden message 
    encrypted := _common.encrypt(test);
    decrypted := _common.decrypt(encrypted );  
  end;
  </code></pre>
  <p>in this scenario, everything works as expected, even with special characters, encrypted would be: 'y'#$0080'vn'</p>
  <p>but if the value is of string[25], it handles special characters differently:</p>
  <pre><code>var
     test,decrypted : string;
     encrypted : string[25]
  begin
    test := 'XXXXXXXX'; // hidden message 
    encrypted := _common.encrypt(test);
    decrypted := _common.decrypt(encrypted);  
  end;
  </code></pre>
  <p>in this scenario, everything work as expected unless the encrypted string contains special characters in this example res1 would be: 'y?vn'</p>
  <p>I'm using string[] in records, when writing/reading data to/from disk</p>
  <p>How can I fix this?</p>
  <p>Can I use a different string type for the record type, or ?</p>
  <p>/Flemming</p>