XML export force character encoding

I’m trying to export the content of a CMS I have which has mySQL Latin1
encoding, but it looks like the server has been forcing UTF-8 encoding of
the data submitted by the CMS via the Server settings.

So when I export the XML, some records break the XML - with this (from the
broswer where I check the data)
error on line 24 at column 19: Input is not proper UTF-8, indicate encoding
! Bytes: 0x03 0x6F 0x66 0x20

There are 26k records so manually discovering and editing the culprits is
not really an option.
My question is, is there a way to process the data before hand or force
character encoding for specific fields as they put into the xml structure?

Thanks

I did just find that wrapping the particular output in htmlparse(myfield)
worked on not breaking the XML, though it did wrap it in HTML page tags - I
can remove these in a mysql query I should imagine. Still interestedi n a
cleaner solution though,On Friday, 18 September 2015 15:44:33 UTC+1, Nick Batt wrote:

I’m trying to export the content of a CMS I have which has mySQL Latin1
encoding, but it looks like the server has been forcing UTF-8 encoding of
the data submitted by the CMS via the Server settings.

So when I export the XML, some records break the XML - with this (from the
broswer where I check the data)
error on line 24 at column 19: Input is not proper UTF-8, indicate
encoding ! Bytes: 0x03 0x6F 0x66 0x20

There are 26k records so manually discovering and editing the culprits is
not really an option.
My question is, is there a way to process the data before hand or force
character encoding for specific fields as they put into the xml structure?

Thanks

On your cffile (or equivalent) use the charset=“” argument?