How to prevent CKEditor from replacing spaces with &nbsp;?
I solve this with a text filter

/**
 * Implements hook_filter_info().
 */
function MYMODULE_filter_info() {
  $filters = array();

  $filters['kill_nbsp'] = array(
    'title' =&gt; t('Kill Non-Breaking Spaces'),
    'description' =&gt; t('Remove non-breaking spaces.'),
    'process callback' =&gt; '_MYMODULE_filters_kill_nbsp',
    'tips callback' =&gt; '_MYMODULE_filters_kill_nbsp_tips',
  );

  return $filters;
}

/**
 * Filter callbacks.
 */
function _MYMODULE_filters_kill_nbsp($text, $filter) {
  return preg_replace('/&amp;nbsp;/', ' ', $text);
}

/**
 * Filter tips.
 */
function _MYMODULE_filters_kill_nbsp_tips($filter, $format, $long = FALSE) {
  if (!$long) {
    // This string will be shown in the content add/edit form.
    return t('Don\'t use non-breaking spaces.  Ever.');
  }
  else {
    // And this one on the "Filter Tips" page.
    return t('Non-breaking spaces are evil and will be eradicated.');
  }
}


The code simply searches for non-breaking spaces and replaces them with normal spaces.

Stuff this in a custom module, and then assign the filter to the input formats that have WYSIWYG enabled.  This does assume that you never want actual non-breaking spaces in your output, which is good for my sites.