How can I escape the characters { and } in Inno Setup, the characters are used in the [Registry] section?
{, "{" do not compile.
%7d, "%7d", {%7d} all compile, but do not work, they result in the wrong values in the registry.
Best regards.
In computing and telecommunication, an escape character is a character that invokes an alternative interpretation on the following characters in a character sequence. An escape character is a particular case of metacharacters.
Escape character syntax An escape sequence contains a backslash (\) symbol followed by one of the escape sequence characters or an octal or hexadecimal number.
You can escape the { by doubling it. There is no need to escape the } as it is only used if inside a constant.
From the help file:
A "{" character is treated as the start of the constant. If you want to use that actual character in a place where constants are supported, you must use two consecutive "{" characters. (You do not need to double "}" characters.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With