I have found a bug when saving the key/value value.

I have found a bug when saving the key/value value.
Delphi XE7
Windows 8.1 64bit.

If one of the Values contains an apostrophe ('), then the file incorectly adds a semicolon (;).

Setting CompanyName to "none" is OK

   
        true
        1
        2
        CompanyName=none;FileDescription=;FileVersion=1.1.2.3;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
        1033
        3
        false
   

    
but using "it's a test 2" causes this:  
   
        true
        2
        3
        CompanyName=no'ne;FileDescription=;FileVersion=1.2.3.4;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=
        1033
        4
        false
   

    
Do a compile and the .vrc shows:
"
 {
  BLOCK "040904E4"
  {
   VALUE ""CompanyName",  "no'ne\000\000"
   VALUE "FileVersion",  "1.2.3.4\000\000"
   VALUE "ProductVersion",  "1.0.0.0\000\000"
  }
 }    
 
 The easiest way I found to fix this is to edit the .dpoj and fix or delete the companyname value (no'ne -> none or '').
 
 Has anyone else run into this?

Comments