Closed owenzhao closed 4 years ago
With the new API in master
you can do something like this:
let encoder = XMLEncoder()
encoder.charactersEscapedInElements = [
("&", "&"),
("<", "<"),
(">", ">"),
("'", "'"),
]
This will disable the "
substitution, but preserve the rest of the default ones.
In xliff exported by Xcode, most of the time there is a note element, like this
When decoded and encoded by XMLCoder, the "s in the element's value are escaping.
Both are accepted by Xcode. Just the latter is not as clear as the prior in raw format for human reading.