TX509CSR.Decode a CsrStr doesn't follow the PKCS#10 format

Working code:

procedure TForm3.Button2Click(Sender: TObject);
begin
  var TMSCsrStr := '-----BEGIN CERTIFICATE REQUEST-----'+
  'MIICmzCCAYMCAQIwVjELMAkGA1UEBgwCREUxDDAKBgNVBAgMA05SVzETMBEGA1UE'+
  'CgwKQ0xJRU5UX09SRzEUMBIGA1UECwwLQ0xJRU5UX1VOSVQxDjAMBgNVBAMMBTEx'+
  'MTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3lSk7CHHApu7kyMD'+
  'L8EqGnJMCx65qf/LVDd/76T1pyO4CutuhHPe3Z+U2qvdzaymOm7LqCxSQo11VIfm'+
  '/PwTD4gfebDQvVK5E8SvNzT7d2AOv0ha45p2+5dU8zxuqC5DSl40YN9Qq9Uaz7J1'+
  '5zbr51roDTNy/dJv7HdrXhLR1v1PTSBUIcNNzcmcl23RXddvDuz2mdSRs/G9SWrW'+
  'aOgGvzSqtsBS49ynuibCRosL8QfOb3s0PP2p1tQXTdm2b2/MnhagnpxjaFR3NcXZ'+
  'xgO/5CkspOqhqBv0HMHHfeNdIRBTuYgmkqqWSt2oL4Ys/3Rsw5zk26Fynecu37um'+
  'htrSGQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAA2m2mLIFWVzz2SvTe4lm7vC'+
  'LoS+zMd+8INqfNOlnLcPxITRKR7lBEyGigKEhiWcfDjzpRNQnnQcSaRK/y6zO9an'+
  'GuZK0sbuSsngqCPkxgUzpQEAyAXmIkfG0azZFPW0yWVxiuKehUEalrVRpw1u40UD'+
  'xrXe/lxuDdNqdGMmIJ4at5FKMoW96H2YzP4AQ6LaFB6uRsoT3Keb3o0LxQ1+9H5f'+
  'fcMnyWmyyPCi7gZpI5aElL9fR10YmLNW6UDpG/xENmSv1M28zkamOg+P5UUriB7m'+
  '16tB4sjU/s4LPmdz8giX+PDet1nMNgqoG5sp4RVNpLUcyWMi3sVcPmm++8lXoNE='+
  '-----END CERTIFICATE REQUEST-----';

  TMSCsrStr := StringReplace(TMSCsrStr, '-----BEGIN CERTIFICATE REQUEST-----', '', [rfReplaceAll]);
  TMSCsrStr := Trim(StringReplace(TMSCsrStr, '-----END CERTIFICATE REQUEST-----', '', [rfReplaceAll]));

  X509CSR1.CsrStr := TMSCsrStr;

  X509CSR1.Decode;
end;

NOT working code:

procedure TForm3.Button2Click(Sender: TObject);
begin
  var TMSCsrStr := '-----BEGIN CERTIFICATE REQUEST-----'+
  'MIICmzCCAYMCAQIwVjELMAkGA1UEBgwCREUxDDAKBgNVBAgMA05SVzETMBEGA1UE'+
  'CgwKQ0xJRU5UX09SRzEUMBIGA1UECwwLQ0xJRU5UX1VOSVQxDjAMBgNVBAMMBTEx'+
  'MTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3lSk7CHHApu7kyMD'+
  'L8EqGnJMCx65qf/LVDd/76T1pyO4CutuhHPe3Z+U2qvdzaymOm7LqCxSQo11VIfm'+
  '/PwTD4gfebDQvVK5E8SvNzT7d2AOv0ha45p2+5dU8zxuqC5DSl40YN9Qq9Uaz7J1'+
  '5zbr51roDTNy/dJv7HdrXhLR1v1PTSBUIcNNzcmcl23RXddvDuz2mdSRs/G9SWrW'+
  'aOgGvzSqtsBS49ynuibCRosL8QfOb3s0PP2p1tQXTdm2b2/MnhagnpxjaFR3NcXZ'+
  'xgO/5CkspOqhqBv0HMHHfeNdIRBTuYgmkqqWSt2oL4Ys/3Rsw5zk26Fynecu37um'+
  'htrSGQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAA2m2mLIFWVzz2SvTe4lm7vC'+
  'LoS+zMd+8INqfNOlnLcPxITRKR7lBEyGigKEhiWcfDjzpRNQnnQcSaRK/y6zO9an'+
  'GuZK0sbuSsngqCPkxgUzpQEAyAXmIkfG0azZFPW0yWVxiuKehUEalrVRpw1u40UD'+
  'xrXe/lxuDdNqdGMmIJ4at5FKMoW96H2YzP4AQ6LaFB6uRsoT3Keb3o0LxQ1+9H5f'+
  'fcMnyWmyyPCi7gZpI5aElL9fR10YmLNW6UDpG/xENmSv1M28zkamOg+P5UUriB7m'+
  '16tB4sjU/s4LPmdz8giX+PDet1nMNgqoG5sp4RVNpLUcyWMi3sVcPmm++8lXoNE='+
  '-----END CERTIFICATE REQUEST-----';

  X509CSR1.CsrStr := TMSCsrStr;

  X509CSR1.Decode;
end;

Fix it please!

Hello, would you please somehow comment this topic? Thank you!