Opened 5 years ago

Closed 4 years ago

#1485607 closed Bugs (worksforme)

Broken encoding in atached html and htm files

Reported by: simplexe Owned by:
Priority: 5 Milestone: 0.2.2
Component: MIME parsing Version: git-master
Severity: normal Keywords:
Cc:

Description

Hi
When I send messages with embedded html file on the Russian encoding, then at the opening of RC she displayed incorrectly. Versions 0.2 to svn.
I apologize for my English.

Attachments (4)

good_russian_encoding.png (68.9 KB) - added by simplexe 5 years ago.
Bad_russian_encoding_after_recieve_html_files.png (105.1 KB) - added by simplexe 5 years ago.
also_bad_russian_encoding_after_action_download.png (104.8 KB) - added by simplexe 5 years ago.
1.zip (2.3 KB) - added by simplexe 5 years ago.
sample

Download all attachments as: .zip

Change History (17)

Changed 5 years ago by simplexe

comment:1 Changed 5 years ago by alec

  • Component changed from Core functionality to User Interface

Attach sample message, please.

Changed 5 years ago by simplexe

sample

comment:2 Changed 5 years ago by tensor

Confirming the issue with the attached example file. The file is in fact UTF-8, but RC (or my Courier) treats it as being latin1.

I have sent it through Thunderbird to myself.
Thunderbird have correctly set the headers for attachment part:

Content-Type: text/html; charset=UTF-8;
 name="1.htm"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="1.htm"

comment:3 Changed 5 years ago by alec

  • Milestone changed from later to 0.2-stable

comment:4 follow-up: Changed 5 years ago by alec

  • Component changed from User Interface to MIME parsing
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [781f341b]. There was no attachment charset set when message was sent.

comment:5 in reply to: ↑ 4 Changed 5 years ago by simplexe

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to alec:

Fixed in [781f341b]. There was no attachment charset set when message was sent.

no work :(

comment:6 follow-up: Changed 5 years ago by alec

This will work only for newly created messages. The change adds charset definition to attachment part. Rouncube relies on BODYSTRUCTURE, and has no charset detection method (Thunderbird uses chardet)., so currently is not possible to detect attachment character set if it's not specified in header.

comment:7 in reply to: ↑ 6 Changed 5 years ago by simplexe

Replying to alec:

This will work only for newly created messages. The change adds charset definition to attachment part. Rouncube relies on BODYSTRUCTURE, and has no charset detection method (Thunderbird uses chardet)., so currently is not possible to detect attachment character set if it's not specified in header.

i know. i create new message and add attachment html. letter headers:

Content-Type: text/html; charset=UTF-8;
 name="1.htm"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="1.htm"

and body html from roundcube create as utf8, but attachment part encoding as latin1.

comment:8 Changed 5 years ago by alec

So, as you see, headers are set correctly now. What returns your imap server for BODYSTRUCTURE command?

comment:9 Changed 5 years ago by simplexe

<html><head>
<title>RoundCube Mail</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

comment:10 Changed 4 years ago by simplexe

hi!
there is progress in the work?

comment:11 Changed 4 years ago by alec

Show imap's BODYSTRUCTURE reply for that message. Also attach the message. It works for me. Charset in attachment Content-Type header is set correctly to UTF-8.

comment:12 Changed 4 years ago by alec

Attach the whole message source, please.

comment:13 Changed 4 years ago by alec

  • Resolution set to worksforme
  • Status changed from reopened to closed

It maybe a BOM issue fixed in [3bde305e]. Closing now.

Note: See TracTickets for help on using tickets.