properties
properties copied to clipboard
Equal sign is incorrectly escaped in key
I'm doing the following test:
// Set a key to "a=b" and value "c"
p := properties.NewProperties()
p.Set("a=b", "c")
buf := new(bytes.Buffer)
p.Write(buf, properties.UTF8)
println(buf.String())
I'd espect the serialized version to be:
a\=b = c
Since the \
should be used to escape the first equal sign, but the program prints:
a=b = c
Which seems wrong. If saved in a file and read again, the key becomes "a" (while, when reading from the correct file, the key is correctly interpreted as "a=b").