Although Apache's implementation handles some extra cases (like control characters and invalid unicode codepoints): source code
r
Rob Elliot
01/09/2021, 9:15 AM
In my experience, whenever I think “isn’t it just...” about serialising to or parsing a text based data format I’m just about to introduce a bug.
👍 2
c
christophsturm
01/09/2021, 11:11 AM
@Ben Woodworth thanks that snippet is exactly what i need. for attributes I'm also going to escape \n but then its perfect