XML UTF-8 Character Encoding
Last updated
Last updated
When generating XML, explicitly set the document to UTF-8 character encoding.
If using other encoding methods (eg, MacRoman for OS X), special characters such as μg/ml are stored incorrectly. This could cause data integrity issues.
In Groovy, set the encoding attribute on the StreamingMarkupBuilder object as shown in the following example: