Author Topic: Where to set Transfer Encoding and Charset?  (Read 8434 times)

Offline tonyvier

  • Jr. Member
  • **
  • Posts: 31
Where to set Transfer Encoding and Charset?
« on: March 14, 2015, 07:28:56 AM »
I had an old Roundcube and deleted it, installed the 1.1 version.

It didn't occur to me in the "old" version, but the latest version always uses "Content-Transfer-Encoding: 7bit" and "Content-Type: text/plain; charset=US-ASCII;"

Searched around, looked at conf files, could not find a way to set it to 8bit and UTF-8, like all my other emailers do....

How can I change this (saw some funny characters)

Thanks !
« Last Edit: March 14, 2015, 09:15:05 AM by tonyvier »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Where to set Transfer Encoding and Charset?
« Reply #1 on: March 15, 2015, 03:18:47 AM »
What strange characters? The code is:
Code: [Select]
// choose transfer encoding for plain/text body
if (preg_match('/[^\x00-\x7F]/', $MAIL_MIME->getTXTBody())) {
    $text_charset      = $message_charset;
    $transfer_encoding = $RCMAIL->config->get('force_7bit') ? 'quoted-printable' : '8bit';
}
else {
    $text_charset      = 'US-ASCII';
    $transfer_encoding = '7bit';
}

Offline tonyvier

  • Jr. Member
  • **
  • Posts: 31
Re: Where to set Transfer Encoding and Charset?
« Reply #2 on: March 15, 2015, 05:49:53 AM »
Ah Thanks...

That's in /roundcube/program/steps/mail/sendmail.inc

Attached two pics, mailone is how the mail shows in Roundcube, mailtwo is how the mail shows in the Type Android email app.

This is in the header of the received email:

Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Don't know if it has anything to do with 7 or 8 bit, but since all my other email programs seem to use 8bit and UTF-8, I thought using this as my default for sending email, may solve this.
'
Anyways, my default is now 8bit and UTF-8, we will see.


Offline tonyvier

  • Jr. Member
  • **
  • Posts: 31
Re: Where to set Transfer Encoding and Charset?
« Reply #3 on: March 15, 2015, 09:40:37 AM »
Oh, this mail is: MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: quoted-printable

But still shows the strange question marks, after the dash.

original.jpg = Show Source
inspectelement.jpg = Inspect Element with Chrome
« Last Edit: March 15, 2015, 09:49:11 AM by tonyvier »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Where to set Transfer Encoding and Charset?
« Reply #4 on: March 15, 2015, 11:36:45 AM »
Ok, I guess these two characters might by 0x02 and 0x03 added by the code related to HTML editor mode change in Roundcube. However, I have no idea how they slipped into the message. So, question is how do you create the message you're sending (what browser, what editor mode etc.). Also try to create the signature again.

Offline tonyvier

  • Jr. Member
  • **
  • Posts: 31
Re: Where to set Transfer Encoding and Charset?
« Reply #5 on: March 15, 2015, 11:39:58 AM »
Chrome 41.0.2272.89 m, Compose in text. Oh, the --- is not in my signature.

Anyways, it's fine now, since I set the default to 8bit and UTF-8

« Last Edit: March 15, 2015, 11:48:44 AM by tonyvier »

Offline tonyvier

  • Jr. Member
  • **
  • Posts: 31
Re: Where to set Transfer Encoding and Charset?
« Reply #6 on: March 16, 2015, 02:51:08 AM »
Actually its not fine.

I still see the -? -? -?

(I now see I may be posting this in the wrong forum, sorry)

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Where to set Transfer Encoding and Charset?
« Reply #7 on: August 17, 2015, 09:53:42 AM »