Prevent output of control code characters in Views Data Export
Views Data Export enables you to write your own .tpl files for fields. So, in a template for a problematic fields, you might use

preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $input);


to strip all potentially problematic characters. Of course cut list of chars for your specific need and if they are in any way meaningful to your users, consider replacing them with some mark instead of eradicating them entirely. It's a bit clumsy solution, but as far as I remember it works, ant it's fast to get up and running.

You can also use preprocess hook instead of tpl:

/**
 * Implements hook_preprocess_views_view_field().
 */
function mymodule_preprocess_views_view_field(&amp;$vars) {
  if ($vars['view']-&gt;name == 'myview' &amp;&amp; $vars['view']-&gt;plugin_name = 'views_data_export_xml') {
    $vars['output'] = preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $vars['output']);
  }
}