1. That sounds like a bug in clover configurator that should be fixed there, not here.
The hex output is actually readable since the patches are just for hex codec ids. Converting the patches to data strings makes the patches unreadable.
2. I don't like your change as having perl convert the numbers to hex strings and then externally forking xxd to convert them back makes no real sense.
The XML I'm generating works as is if you aren't using clover configurator.
The xxd converts the hex "text" to binary as required by base64.
The wiki for config.plist states the patches should be data: http://clover-wiki.z...es#KextsToPatch