Encoding and BOM output different when Debugging and Running a Data Mapping Transform

Debugging a Data Mapping Transform
When you debug a data mapping using 'Start Debugging F5', the global application Encoding and BOM options are used. These settings can be changed in the application Options from the Tools menu:
'Tools->Options->Environment->File Encoding' drop down list
and
'Tools->Options->Environment->Write Byte Order Marker (BOM)' checkbox

Running a Data Mapping Transform
When you run a data mapping using 'Execute Shift+F5' or when you generate source code (.dll) or an executable (.exe), the output component Encoding and BOM options are used. These are set on each output component, e.g. 'XML Writer'.