https://sourceware.org/bugzilla/show_bug.cgi?id=32003
--- Comment #23 from Benjamin Drung <bdrung at posteo dot de> --- (In reply to H.J. Lu from comment #14) > (In reply to Benjamin Drung from comment #13) > > > > Will "%[string]" escape work? > > > > Like this? > > > > -Wl,--encoded-package-metadata={%[quot]type%[quot]: > > %[quot]deb%[quot]%[comma]%[quot]os%[quot]: > > %[quot]ubuntu%[quot]%[comma]%[quot]name%[quot]: > > %[quot]dpkg%[quot]%[comma]%[quot]version%[quot]:%[quot]1.22. > > 6ubuntu15%[quot]%[comma]%[quot]architecture%[quot]:%[quot]amd64%[quot]} > > It should be %[quote]". You suggested to borrow from HTML's Named Character References and https://dev.w3.org/html5/spec-LC/named-character-references.html says that U+00022 has the name "quot" (not "quote"). > Will adding support for "%[string]" to existing > --package-metadata option break anything? It might theoretical break existing use cases. --package-metadata='{"version":"1.0%2"}' The only safe option that I could come up with is to use a marker that would be invalid JSON. For example: If the string starts with a percent character, decode it: --package-metadata='%{"foo":"bar"%[comma]"baz":42}' would be invalid JSON and decode to: --package-metadata='{"foo":"bar","baz":42}' -- You are receiving this mail because: You are on the CC list for the bug.