如何转义字符 {
和 }
在 Inno Setup 中,字符用于 [Registry]
部分?{
, "{"
不编译。%7d
, "%7d"
, {%7d}
所有编译,但不工作,它们导致注册表中的错误值。
此致。
最佳答案
你可以逃脱{
通过加倍。没有必要逃避}
因为它仅在常量内部使用。
来自 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.)
关于escaping - 如何在 Inno Setup 中转义 "{"和 "}",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12800425/