added unicode replacment, document-supplied metadata