Invalid charset detected when forwarding mails with attachments

Behrooz Afghahi <[email protected]> Mon, 07 Feb 2011 15:40:12 +0330
Newsgroups gmane.mail.squirrelmail.internationalization
Message-ID <1297080612.31688.25.camel@localhost>
Hi,

My Default Charset is UTF-8, when I forward messages with attachments
all the characters turn into "?" (My language is fa_IR, any other UTF-8
language should also have this problem), I checked the code and it seems
like the charset in header parameters is "us-ascii" (for the bodypart
in /src/compose.php, newMail function). here is the server response when
the code tries to fetch the message :

* 15 FETCH (UID 24 FLAGS (\Seen) BODYSTRUCTURE ((("text"
"plain" ("charset" "us-ascii") NIL NIL "8bit" 26 3 NIL NIL NIL
NIL)("text" "html" ("charset" "utf-8") NIL NIL "8bit" 20 0 NIL NIL NIL
NIL) "alternative" ("boundary"
"4685fsu_trap_06875_55854170201102_=----") NIL NIL NIL)("image"
"png" ("name" "s.gh.png") NIL NIL "base64" 249296 NIL
("attachment" ("filename" "s.gh.png")) NIL NIL) "mixed" ("boundary"
"----=_20110207145855_57860") NIL NIL NIL))

Server: PHP 5.3.3 , Apache 2.2.15 , Fedora 12 , SquirrelMail Source
installed , Sendmail 
SquirrelMail Version : 4.21
Plugins : html_mail , mail_fetch, newmail , squirrelspell
I tried both $lossy_encoding = true and false.

to reproduce :
Send a message to your self using the HTML editor (plain text editor
does not produce this problem) using UTF-8 and some content (not in
english) and add an attachment. then try forwarding that message.

Have a nice day !
Behrooz Afghahi




------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
-----
squirrelmail-i18n mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
Information about translations: http://squirrelmail.org/wiki/LanguageTranslation
Statistics for translations: http://l10n-stats.squirrelmail.org/
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.internationalization
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-i18n