TX509Certificate.Decode - problem with unicode

I have a certificate created using a demo. Now I'm trying to retrieve data from it. I have the following problem.

FX509Crt.Unicode := yesUni;
'No mapping for the Unicode character exists in the target multi-byte code page'.

FX509Crt.Unicode := noUni;
Debugger Exception Notification
''' is not a valid integer value'.


Creating a new certificate helped.

Hello Stanislav,
The demo is not robust and doesn't check the code or input for every possible error. This can result in unexpected behaviour if you use it for other purposes.

Thank you for warning. I'm just learning right now.