diff -cr roundcubemail-0.8.5/config/main.inc.php.dist roundcubemail-0.8.5-ja/config/main.inc.php.dist
*** roundcubemail-0.8.5/config/main.inc.php.dist	2013-01-26 02:00:48.000000000 +0900
--- roundcubemail-0.8.5-ja/config/main.inc.php.dist	2013-03-02 20:02:12.000000000 +0900
***************
*** 338,344 ****
  $rcmail_config['line_length'] = 72;
  
  // send plaintext messages as format=flowed
! $rcmail_config['send_format_flowed'] = true;
  
  // don't allow these settings to be overriden by the user
  $rcmail_config['dont_override'] = array();
--- 338,344 ----
  $rcmail_config['line_length'] = 72;
  
  // send plaintext messages as format=flowed
! $rcmail_config['send_format_flowed'] = false;
  
  // don't allow these settings to be overriden by the user
  $rcmail_config['dont_override'] = array();
***************
*** 775,780 ****
--- 775,783 ----
  // When replying place cursor above original message (top posting)
  $rcmail_config['top_posting'] = false;
  
+ // Default charset for sending message
+ $rcmail_config['send_charset'] = 'ISO-8859-1';
+ 
  // When replying strip original signature from message
  $rcmail_config['strip_existing_sig'] = true;
  
***************
*** 791,796 ****
--- 794,802 ----
  // Use MIME encoding (quoted-printable) for 8bit characters in message body
  $rcmail_config['force_7bit'] = false;
  
+ // Use MIME B encoding (base64) for header
+ $rcmail_config['head_encoding_base64'] = false;
+ 
  // Defaults of the search field configuration.
  // The array can contain a per-folder list of header fields which should be considered when searching
  // The entry with key '*' stands for all folders which do not have a specific list set.
diff -cr roundcubemail-0.8.5/program/include/rcube_charset.php roundcubemail-0.8.5-ja/program/include/rcube_charset.php
*** roundcubemail-0.8.5/program/include/rcube_charset.php	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/include/rcube_charset.php	2013-02-28 22:18:10.000000000 +0900
***************
*** 182,188 ****
          static $mbstring_list   = null;
          static $conv            = null;
  
!         $to   = empty($to) ? strtoupper(RCMAIL_CHARSET) : $to;
          $from = self::parse($from);
  
          // It is a common case when UTF-16 charset is used with US-ASCII content (#1488654)
--- 182,188 ----
          static $mbstring_list   = null;
          static $conv            = null;
  
!         $to   = empty($to) ? strtoupper(RCMAIL_CHARSET) : self::parse($to);
          $from = self::parse($from);
  
          // It is a common case when UTF-16 charset is used with US-ASCII content (#1488654)
***************
*** 195,200 ****
--- 195,232 ----
              return $str;
          }
  
+         // 日本語コードの場合、Microsoft拡張文字セットを認識させるよう修正した
+         // mbstring を iconv より優先して用いるため、順序を変更した
+         if ($mbstring_loaded === null) {
+             $mbstring_loaded = extension_loaded('mbstring');
+         }
+ 
+         // convert charset using mbstring module
+         if ($mbstring_loaded) {
+             $aliases['WINDOWS-1257'] = 'ISO-8859-13';
+ 
+             $aliases['JIS']  = 'ISO-2022-JP-MS';
+             $aliases['ISO-2022-JP']  = 'ISO-2022-JP-MS';
+             $aliases['EUC-JP']  = 'EUCJP-WIN';
+             $aliases['SJIS']  = 'SJIS-WIN';
+             $aliases['SHIFT_JIS']  = 'SJIS-WIN';
+ 
+             if ($mbstring_list === null) {
+                 $mbstring_list = mb_list_encodings();
+                 $mbstring_list = array_map('strtoupper', $mbstring_list);
+             }
+ 
+             $mb_from = $aliases[$from] ? $aliases[$from] : $from;
+             $mb_to   = $aliases[$to] ? $aliases[$to] : $to;
+ 
+             // return if encoding found, string matches encoding and convert succeeded
+             if (in_array($mb_from, $mbstring_list) && in_array($mb_to, $mbstring_list)) {
+                 if (mb_check_encoding($str, $mb_from) && ($out = mb_convert_encoding($str, $mb_to, $mb_from))) {
+                     return $out;
+                 }
+             }
+         }
+ 
          // convert charset using iconv module
          if (function_exists('iconv') && $from != 'UTF7-IMAP' && $to != 'UTF7-IMAP') {
              if ($iconv_options === null) {
***************
*** 221,250 ****
              }
          }
  
-         if ($mbstring_loaded === null) {
-             $mbstring_loaded = extension_loaded('mbstring');
-         }
- 
-         // convert charset using mbstring module
-         if ($mbstring_loaded) {
-             $aliases['WINDOWS-1257'] = 'ISO-8859-13';
- 
-             if ($mbstring_list === null) {
-                 $mbstring_list = mb_list_encodings();
-                 $mbstring_list = array_map('strtoupper', $mbstring_list);
-             }
- 
-             $mb_from = $aliases[$from] ? $aliases[$from] : $from;
-             $mb_to   = $aliases[$to] ? $aliases[$to] : $to;
- 
-             // return if encoding found, string matches encoding and convert succeeded
-             if (in_array($mb_from, $mbstring_list) && in_array($mb_to, $mbstring_list)) {
-                 if (mb_check_encoding($str, $mb_from) && ($out = mb_convert_encoding($str, $mb_to, $mb_from))) {
-                     return $out;
-                 }
-             }
-         }
- 
          // convert charset using bundled classes/functions
          if ($to == 'UTF-8') {
              if ($from == 'UTF7-IMAP') {
--- 253,258 ----
diff -cr roundcubemail-0.8.5/program/include/rcube_mime.php roundcubemail-0.8.5-ja/program/include/rcube_mime.php
*** roundcubemail-0.8.5/program/include/rcube_mime.php	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/include/rcube_mime.php	2013-02-28 22:34:32.000000000 +0900
***************
*** 151,157 ****
          foreach ($a as $val) {
              $j++;
              $address = trim($val['address']);
!             $name    = trim($val['name']);
  
              if ($name && $address && $name != $address)
                  $string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
--- 151,157 ----
          foreach ($a as $val) {
              $j++;
              $address = trim($val['address']);
!             $name = preg_replace(array('/^[\'"]/','/[\'"]$/'),'', trim($val['name']));
  
              if ($name && $address && $name != $address)
                  $string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
diff -cr roundcubemail-0.8.5/program/include/rcube_shared.inc roundcubemail-0.8.5-ja/program/include/rcube_shared.inc
*** roundcubemail-0.8.5/program/include/rcube_shared.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/include/rcube_shared.inc	2013-03-03 17:48:31.518185115 +0900
***************
*** 173,191 ****
   */
  function rc_wordwrap($string, $width=75, $break="\n", $cut=false)
  {
!   $para = explode($break, $string);
    $string = '';
    while (count($para)) {
      $line = array_shift($para);
!     if ($line[0] == '>') {
!       $string .= $line.$break;
        continue;
      }
      $list = explode(' ', $line);
      $len = 0;
      while (count($list)) {
        $line = array_shift($list);
!       $l = mb_strlen($line);
        $newlen = $len + $l + ($len ? 1 : 0);
  
        if ($newlen <= $width) {
--- 173,208 ----
   */
  function rc_wordwrap($string, $width=75, $break="\n", $cut=false)
  {
!   global $message_charset;
! 
!   // convert into utf8 (for optimize in iso-2022-jp KI/KO duplicate)
!   $string = mb_convert_encoding($string, 'UTF-8', $message_charset);
! 
!   // Step 1：original line-wrap process for ASCII string
!   $para = mb_split("\n", $string);
    $string = '';
    while (count($para)) {
      $line = array_shift($para);
!     // skip, if newline only
!     if(mb_strlen($line, 'UTF-8') == 0) {
!         $string .= $break;
!         continue;
!     }
!     // skip line-wrap, if $line is double-width character (CJK) string
!     if(mb_strlen($line, 'UTF-8') != mb_strwidth($line, 'UTF-8')) {
!       $string .= $line;
!       $string .= $break;
        continue;
      }
+     $in_quote = false;
+     // quoted line detect
+     if ($line[0] == '>') $in_quote = true;
+ 
      $list = explode(' ', $line);
      $len = 0;
      while (count($list)) {
        $line = array_shift($list);
!       $l = mb_strlen($line, 'UTF-8');
        $newlen = $len + $l + ($len ? 1 : 0);
  
        if ($newlen <= $width) {
***************
*** 196,221 ****
            if ($cut) {
              $start = 0;
              while ($l) {
!               $str = mb_substr($line, $start, $width);
!               $strlen = mb_strlen($str);
!               $string .= ($len ? $break : '').$str;
                $start += $strlen;
                $l -= $strlen;
                $len = $strlen;
              }
            } else {
!                 $string .= ($len ? $break : '').$line;
              if (count($list)) $string .= $break;
              $len = 0;
            }
          } else {
!           $string .= $break.$line;
            $len = $l;
          }
        }
      }
      if (count($para)) $string .= $break;
    }
    return $string;
  }
  
--- 213,290 ----
            if ($cut) {
              $start = 0;
              while ($l) {
!               $str = mb_substr($line, $start, $width, 'UTF-8');
!               $strlen = mb_strlen($str, 'UTF-8');
!               $string .= ($len ? $break.'>' : '').$str;
                $start += $strlen;
                $l -= $strlen;
                $len = $strlen;
              }
            } else {
!                 $string .= ($len ? $break.'>' : '').$line;
              if (count($list)) $string .= $break;
              $len = 0;
            }
          } else {
!           if($in_quote) $string .= $break.'>'.$line;
!           else $string .= $break.$line;
            $len = $l;
          }
        }
      }
      if (count($para)) $string .= $break;
    }
+ 
+   // Step 2：line-wrap process for non ASCII double-width character (CJK) string
+   $para = explode($break, $string);
+   $string = '';
+   while (count($para)) {
+     $line = array_shift($para);
+     // skip, if newline only
+     if(mb_strlen($line, 'UTF-8') == 0) {
+         $string .= $break;
+         continue;
+     }
+     // skip, if ASCII (single-width char) string
+     elseif(mb_strlen($line, 'UTF-8') == mb_strwidth($line, 'UTF-8')) {
+         $string .= $line;
+         $string .= $break;
+         continue;
+     }
+     $in_quote = false;
+     // quoted line detect
+     if ($line[0] == '>' || mb_substr($line,0,1,'UTF-8') == '＞') {
+       // strip quote char '>'
+       $line = mb_substr($line, 1, mb_strlen($line, 'UTF-8') - 1, 'UTF-8');
+       $in_quote = true;
+     }
+ 
+     $line_part = "";
+     $len = 0;
+     for($i=0; $i<mb_strlen($line, 'UTF-8'); $i++)
+     {
+         $char= mb_substr($line, $i, 1, 'UTF-8');
+         $line_part .= $char;
+         if($char == "\n")
+         {
+             $len = 0;
+         }
+         $len += mb_strwidth($char, 'UTF-8'); //==1?1:2;  // 切り出された文字のバイト数
+         if($len >= $width)
+         {
+             $len=0;
+             if($in_quote) $string .= '>';
+             $string .= $line_part.$break;
+             $line_part = '';
+         }
+     }
+     if($in_quote) $string .= '>';
+     $string .= $line_part.$break;
+   }
+ 
+   // convert into mail-sending encoding
+   $string = mb_convert_encoding($string, $message_charset, 'UTF-8');
+ 
    return $string;
  }
  
diff -cr roundcubemail-0.8.5/program/localization/en_US/labels.inc roundcubemail-0.8.5-ja/program/localization/en_US/labels.inc
*** roundcubemail-0.8.5/program/localization/en_US/labels.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/localization/en_US/labels.inc	2013-02-28 22:40:52.000000000 +0900
***************
*** 421,426 ****
--- 421,427 ----
  $labels['miscfolding'] = 'RFC 2047/2231 (MS Outlook)';
  $labels['2047folding'] = 'Full RFC 2047 (other)';
  $labels['force7bit'] = 'Use MIME encoding for 8-bit characters';
+ $labels['encodingbase64'] = 'Use MIME B encoding for header';
  $labels['advancedoptions'] = 'Advanced options';
  $labels['focusonnewmessage'] = 'Focus browser window on new message';
  $labels['checkallfolders'] = 'Check all folders for new messages';
diff -cr roundcubemail-0.8.5/program/localization/ja_JP/labels.inc roundcubemail-0.8.5-ja/program/localization/ja_JP/labels.inc
*** roundcubemail-0.8.5/program/localization/ja_JP/labels.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/localization/ja_JP/labels.inc	2013-02-28 22:42:14.000000000 +0900
***************
*** 360,365 ****
--- 360,366 ----
  $labels['miscfolding'] = 'RFC 2047/2231(MS Outlook)';
  $labels['2047folding'] = 'RFC 2047に完全準拠(その他)';
  $labels['force7bit'] = '8ビット文字列にMIMEエンコードを使用';
+ $labels['encodingbase64'] = 'ヘッダをMIME Base64エンコードする';
  $labels['advancedoptions'] = '高度な設定';
  $labels['focusonnewmessage'] = '新しいメッセージが届いたらブラウザーをアクティブ';
  $labels['checkallfolders'] = 'すべてのフォルダーで新着メールを表示';
diff -cr roundcubemail-0.8.5/program/steps/mail/compose.inc roundcubemail-0.8.5-ja/program/steps/mail/compose.inc
*** roundcubemail-0.8.5/program/steps/mail/compose.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/steps/mail/compose.inc	2013-02-28 22:46:30.000000000 +0900
***************
*** 1501,1506 ****
--- 1501,1514 ----
    return $select->show($COMPOSE['param']['sent_mbox'], $attrib);
  }
  
+ function rcmail_charset_selector($attrib)
+ {
+   global $RCMAIL;
+   return $RCMAIL->output->charset_selector(array(
+ 		'name' => '_charset',
+ 		'selected' => $RCMAIL->config->get('send_charset')
+ 	));
+ }
  
  function rcmail_check_sent_folder($folder, $create=false)
  {
***************
*** 1614,1619 ****
--- 1622,1628 ----
    'receiptcheckbox' => 'rcmail_receipt_checkbox',
    'dsncheckbox' => 'rcmail_dsn_checkbox',
    'storetarget' => 'rcmail_store_target_selection',
+   'charsetselector' => 'rcmail_charset_selector',
    'addressbooks' => 'rcmail_addressbook_list',
    'addresslist' => 'rcmail_contacts_list',
  ));
diff -cr roundcubemail-0.8.5/program/steps/mail/sendmail.inc roundcubemail-0.8.5-ja/program/steps/mail/sendmail.inc
*** roundcubemail-0.8.5/program/steps/mail/sendmail.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/steps/mail/sendmail.inc	2013-03-02 19:38:56.000000000 +0900
***************
*** 79,92 ****
  
    if ($sql_arr = $RCMAIL->user->get_identity($id)) {
      $out = $sql_arr;
- 
-     if ($message_charset != RCMAIL_CHARSET) {
-       foreach ($out as $k => $v)
-         $out[$k] = rcube_charset_convert($v, RCMAIL_CHARSET, $message_charset);
-     }
- 
      $out['mailto'] = $sql_arr['email'];
!     $out['string'] = format_email_recipient($sql_arr['email'], $sql_arr['name']);
  
      return $out;
    }
--- 79,93 ----
  
    if ($sql_arr = $RCMAIL->user->get_identity($id)) {
      $out = $sql_arr;
      $out['mailto'] = $sql_arr['email'];
!     $name = rcube_charset_convert($sql_arr['name'], RCMAIL_CHARSET, $message_charset);
!     if (function_exists('mb_encode_mimeheader')) {
!       $head_encoding_mode = $RCMAIL->config->get('head_encoding_base64') ? 'B' : 'Q';
!       mb_internal_encoding($message_charset);
!       $name = mb_encode_mimeheader($name, $message_charset, $head_encoding_mode, "\r\n", 8);
!       mb_internal_encoding(RCMAIL_CHARSET);
!     }
!     $out['string'] = format_email_recipient($sql_arr['email'], $name);
  
      return $out;
    }
***************
*** 159,164 ****
--- 160,172 ----
  {
    global $RCMAIL, $EMAIL_FORMAT_ERROR, $RECIPIENT_COUNT;
  
+   // convert UTF-8 to preserve \x2c(,) and \x3b(;) used in ISO-2022-JP;
+   if (function_exists('mb_encode_mimeheader')
+    && function_exists('mb_convert_encoding')) {
+     global $message_charset;
+     $mailto = mb_convert_encoding($mailto, 'UTF-8', $message_charset);
+   }
+ 
    // simplified email regexp, supporting quoted local part
    $email_regexp = '(\S+|("[^"]+"))@\S+';
  
***************
*** 189,196 ****
        if ($name[0] == '"' && $name[count($name)-1] == '"') {
          $name = substr($name, 1, -1);
        }
!       $name = stripcslashes($name);
        $address = rcube_idn_to_ascii(trim($address, '<>'));
        $result[] = format_email_recipient($address, $name);
        $item = $address;
      } else if (trim($item)) {
--- 197,217 ----
        if ($name[0] == '"' && $name[count($name)-1] == '"') {
          $name = substr($name, 1, -1);
        }
! //      $name = stripcslashes($name);
        $address = rcube_idn_to_ascii(trim($address, '<>'));
+       // encode "name" field.
+       if (function_exists('mb_encode_mimeheader')
+        && function_exists('mb_convert_encoding')) {
+         global $message_charset;
+         $head_encoding_mode = $RCMAIL->config->get('head_encoding_base64') ? 'B' : 'Q';
+         $name = mb_convert_encoding($name, $message_charset, 'UTF-8');
+         mb_internal_encoding($message_charset);
+         $name = preg_replace('/^"(.*)"$/', '$1', $name);
+         $name = mb_encode_mimeheader($name, $message_charset, $head_encoding_mode, "\r\n", 8);
+         mb_internal_encoding(RCMAIL_CHARSET);
+       } else {
+         $name = stripcslashes($name);
+       }
        $result[] = format_email_recipient($address, $name);
        $item = $address;
      } else if (trim($item)) {
***************
*** 222,229 ****
  
  // set default charset
  $input_charset = $OUTPUT->get_charset();
! $message_charset = isset($_POST['_charset']) ? $_POST['_charset'] : $input_charset;
! 
  $EMAIL_FORMAT_ERROR = NULL;
  $RECIPIENT_COUNT = 0;
  
--- 243,251 ----
  
  // set default charset
  $input_charset = $OUTPUT->get_charset();
! $send_charset = $RCMAIL->config->get('send_charset');
! global $message_charset;
! $message_charset = isset($_POST['_charset']) ? get_input_value('_charset', RCUBE_INPUT_POST) : ($send_charset != '' ? $send_charset : $input_charset);
  $EMAIL_FORMAT_ERROR = NULL;
  $RECIPIENT_COUNT = 0;
  
***************
*** 313,319 ****
  }
  
  $headers['Date'] = rcmail_user_date();
! $headers['From'] = rcube_charset_convert($from_string, RCMAIL_CHARSET, $message_charset);
  $headers['To'] = $mailto;
  
  // additional recipients
--- 335,341 ----
  }
  
  $headers['Date'] = rcmail_user_date();
! $headers['From'] = $from_string;
  $headers['To'] = $mailto;
  
  // additional recipients
***************
*** 582,600 ****
  else
    $transfer_encoding = '7bit';
  
  // encoding settings for mail composing
  $MAIL_MIME->setParam('text_encoding', $transfer_encoding);
  $MAIL_MIME->setParam('html_encoding', 'quoted-printable');
! $MAIL_MIME->setParam('head_encoding', 'quoted-printable');
  $MAIL_MIME->setParam('head_charset', $message_charset);
  $MAIL_MIME->setParam('html_charset', $message_charset);
  $MAIL_MIME->setParam('text_charset', $message_charset . ($flowed ? ";\r\n format=flowed" : ''));
  
  // encoding subject header with mb_encode provides better results with asian characters
  if (function_exists('mb_encode_mimeheader')) {
    mb_internal_encoding($message_charset);
    $headers['Subject'] = mb_encode_mimeheader($headers['Subject'],
!     $message_charset, 'Q', "\r\n", 8);
    mb_internal_encoding(RCMAIL_CHARSET);
  }
  
--- 604,625 ----
  else
    $transfer_encoding = '7bit';
  
+ $head_encoding = $RCMAIL->config->get('head_encoding_base64') ? 'base64' : 'quoted-printable';
+ 
  // encoding settings for mail composing
  $MAIL_MIME->setParam('text_encoding', $transfer_encoding);
  $MAIL_MIME->setParam('html_encoding', 'quoted-printable');
! $MAIL_MIME->setParam('head_encoding', $head_encoding);
  $MAIL_MIME->setParam('head_charset', $message_charset);
  $MAIL_MIME->setParam('html_charset', $message_charset);
  $MAIL_MIME->setParam('text_charset', $message_charset . ($flowed ? ";\r\n format=flowed" : ''));
  
  // encoding subject header with mb_encode provides better results with asian characters
  if (function_exists('mb_encode_mimeheader')) {
+   $head_encoding_mode = $RCMAIL->config->get('head_encoding_base64') ? 'B' : 'Q';
    mb_internal_encoding($message_charset);
    $headers['Subject'] = mb_encode_mimeheader($headers['Subject'],
!     $message_charset, $head_encoding_mode, "\r\n", 8);
    mb_internal_encoding(RCMAIL_CHARSET);
  }
  
diff -cr roundcubemail-0.8.5/program/steps/settings/func.inc roundcubemail-0.8.5-ja/program/steps/settings/func.inc
*** roundcubemail-0.8.5/program/steps/settings/func.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/steps/settings/func.inc	2013-02-28 23:14:14.000000000 +0900
***************
*** 517,522 ****
--- 517,532 ----
        );
      }
  
+     if (!isset($no_override['head_encoding_base64'])) {
+       $field_id = 'rcmfd_head_encoding_base64';
+       $input_7bit = new html_checkbox(array('name' => '_head_encoding_base64', 'id' => $field_id, 'value' => 1));
+ 
+       $blocks['main']['options']['head_encoding_base64'] = array(
+         'title' => html::label($field_id, Q(rcube_label('encodingbase64'))),
+         'content' => $input_7bit->show($config['head_encoding_base64']?1:0),
+       );
+     }
+ 
      if (!isset($no_override['mdn_default'])) {
        $field_id = 'rcmfd_mdn_default';
        $input_mdn = new html_checkbox(array('name' => '_mdn_default', 'id' => $field_id, 'value' => 1));
***************
*** 560,565 ****
--- 570,586 ----
        );
      }
  
+     if (!isset($no_override['send_charset'])) {
+       $field_id = 'rcmfd_send_charset';
+ 
+       $blocks['main']['options']['send_charset'] = array(
+         'title' => html::label($field_id, Q(rcube_label('defaultcharset'))),
+         'content' => $RCMAIL->output->charset_selector(array(
+ 	  'name' => '_send_charset', 'selected' => $config['send_charset']
+ 	  ))
+       );
+     }
+ 
      if (!isset($no_override['spellcheck_before_send']) && $config['enable_spellcheck']) {
        $field_id = 'rcmfd_spellcheck_before_send';
        $input_spellcheck = new html_checkbox(array('name' => '_spellcheck_before_send', 'id' => $field_id, 'value' => 1));
diff -cr roundcubemail-0.8.5/program/steps/settings/save_prefs.inc roundcubemail-0.8.5-ja/program/steps/settings/save_prefs.inc
*** roundcubemail-0.8.5/program/steps/settings/save_prefs.inc	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/program/steps/settings/save_prefs.inc	2013-02-28 23:18:46.000000000 +0900
***************
*** 77,82 ****
--- 77,83 ----
        'draft_autosave'     => isset($_POST['_draft_autosave']) ? intval($_POST['_draft_autosave']) : 0,
        'mime_param_folding' => isset($_POST['_mime_param_folding']) ? intval($_POST['_mime_param_folding']) : 0,
        'force_7bit'         => isset($_POST['_force_7bit']) ? TRUE : FALSE,
+       'head_encoding_base64' => isset($_POST['_head_encoding_base64']) ? TRUE : FALSE,
        'mdn_default'        => isset($_POST['_mdn_default']) ? TRUE : FALSE,
        'dsn_default'        => isset($_POST['_dsn_default']) ? TRUE : FALSE,
        'reply_same_folder'  => isset($_POST['_reply_same_folder']) ? TRUE : FALSE,
***************
*** 88,93 ****
--- 89,95 ----
        'top_posting'        => !empty($_POST['_top_posting']),
        'strip_existing_sig' => isset($_POST['_strip_existing_sig']),
        'sig_above'          => !empty($_POST['_sig_above']) && !empty($_POST['_top_posting']),
+       'send_charset'       => get_input_value('_send_charset', RCUBE_INPUT_POST),
        'default_font'       => get_input_value('_default_font', RCUBE_INPUT_POST),
        'forward_attachment' => !empty($_POST['_forward_attachment']),
      );
diff -cr roundcubemail-0.8.5/skins/classic/templates/compose.html roundcubemail-0.8.5-ja/skins/classic/templates/compose.html
*** roundcubemail-0.8.5/skins/classic/templates/compose.html	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/skins/classic/templates/compose.html	2013-02-28 23:21:44.000000000 +0900
***************
*** 145,150 ****
--- 145,153 ----
      </tr><tr>
          <td><label><roundcube:label name="savesentmessagein" />:</label></td>
          <td><roundcube:object name="storetarget" maxlength="30" /></td>
+     </tr><tr>
+         <td><label for="rcmcharset"><roundcube:label name="charset" />:</label></td>
+         <td><roundcube:object name="charsetSelector" form="form" id="rcmcomposecharset" /></td>
      </tr>
      </table>
  </div>
diff -cr roundcubemail-0.8.5/skins/larry/templates/compose.html roundcubemail-0.8.5-ja/skins/larry/templates/compose.html
*** roundcubemail-0.8.5/skins/larry/templates/compose.html	2013-01-26 02:00:49.000000000 +0900
--- roundcubemail-0.8.5-ja/skins/larry/templates/compose.html	2013-03-02 20:00:00.000000000 +0900
***************
*** 143,148 ****
--- 143,151 ----
  		<span class="composeoption">
  			<label><roundcube:label name="savesentmessagein" /> <roundcube:object name="storetarget" maxlength="30" style="max-width:12em" /></label>
  		</span>
+ 		<span class="composeoption">
+ 			<label><roundcube:label name="charset" /> <roundcube:object name="charsetSelector" id="rcmcomposecharset" /></label>
+ 		</span>
  		<roundcube:container name="composeoptions" id="composeoptions" />
  	</div>
  </div>
