UTF8 3rd party: declare append before replace_invalid