Fix some encoding errors when writing out layer names.