? boost-601698.patch
Index: boost.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.admin.inc,v
retrieving revision 1.1.2.1.2.3.2.85
diff -u -p -r1.1.2.1.2.3.2.85 boost.admin.inc
--- boost.admin.inc	10 Oct 2009 07:58:35 -0000	1.1.2.1.2.3.2.85
+++ boost.admin.inc	12 Oct 2009 21:06:31 -0000
@@ -382,6 +382,12 @@ function boost_admin_boost_performance_p
     '#default_value' => BOOST_ONLY_ASCII_PATH,
     '#description'   => t('Only allowing ACSII characters is a safe way to cache pages. It severely limits i18n support so this can be turned off. Fair warning, disabling this may cause "page not found" errors depending on your url structure (spaces are bad, ect...). If you follow RFC 3986 you should be ok.'),
   );
+  $form['advanced']['boost_force_utf'] = array(
+    '#type'          => 'checkbox',
+    '#title'         => t('Force Conversion to UTF-8'),
+    '#default_value' => BOOST_FORCE_UTF,
+    '#description'   => t('Convert data to UTF-8 right before saving file.'),
+  );
   $form['advanced']['boost_asynchronous_output'] = array(
     '#type'          => 'checkbox',
     '#title'         => t('Asynchronous Operation: output HTML, close connection, then store static file.'),
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.185
diff -u -p -r1.3.2.2.2.5.2.185 boost.module
--- boost.module	12 Oct 2009 07:50:51 -0000	1.3.2.2.2.5.2.185
+++ boost.module	12 Oct 2009 21:06:32 -0000
@@ -55,6 +55,7 @@ define('BOOST_POST_UPDATE_COMMAND',  var
 define('BOOST_CRON_LIMIT',           variable_get('boost_cron_limit', 100));
 define('BOOST_ASYNCHRONOUS_OUTPUT',  variable_get('boost_asynchronous_output', TRUE));
 define('BOOST_ONLY_ASCII_PATH',      variable_get('boost_only_ascii_path', TRUE));
+define('BOOST_FORCE_UTF',            variable_get('boost_force_utf', TRUE));
 define('BOOST_GZIP',                 variable_get('page_compression', TRUE));
 define('BOOST_AGGRESSIVE_GZIP',      variable_get('boost_aggressive_gzip', FALSE));
 define('BOOST_CLEAR_CACHE_OFFLINE',  variable_get('boost_clear_cache_offline', TRUE));
@@ -1545,6 +1546,10 @@ function boost_cache_set($path, $data, $
     return FALSE;
   }
 
+  if (BOOST_FORCE_UTF) {
+    $data = utf8_encode($data);
+  }
+
   // Create or update the static files as needed
   if (($filename = boost_file_path($path, TRUE, $extension)) && (BOOST_OVERWRITE_FILE || !file_exists($filename) || boost_db_is_expired($filename))) {
     // Special handling of the front page for aggressive gzip test
