UTF8 3rd party: declare append before replace_invalid
Replace invalid chars before convert utf formats