Index: branches/2.4/prototype/services/ImapServiceAdapter.php
===================================================================
--- branches/2.4/prototype/services/ImapServiceAdapter.php	(revision 6389)
+++ branches/2.4/prototype/services/ImapServiceAdapter.php	(revision 6540)
@@ -626,9 +626,9 @@
 						{
 							$body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body);
-							$mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']);
+							$mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
 						}
 						else
-							$mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
-
+							$mailService->addStringAttachment(base64_decode($att['source']), mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+							
 						unset($att);
 					}
@@ -643,8 +643,8 @@
 								{    
 									$body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body);
-									$mailService->addStringImage($att['source'], $att['type'], $att['name']);
+									$mailService->addStringImage($att['source'], $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
 								}
 								else
-									$mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+									$mailService->addStringAttachment($att['source'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
 								unset($att);
 								break;
@@ -652,5 +652,5 @@
 								$mbox_stream = $this->open_mbox($value['folder']);
 								$rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']);
-								$mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' );
+								$mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' );
 								unset($rawmsg);
 								break;
Index: branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php
===================================================================
--- branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 6520)
+++ branches/2.4/expressoMail1_2/inc/class.imap_functions.inc.php	(revision 6540)
@@ -2924,8 +2924,8 @@
                      {
                          $body = str_replace('"../prototype/getArchive.php?mailAttachment='.$att['id'].'"', $att['name'], $body);
-                         $mailService->addStringImage(base64_decode($att['source']), $att['type'], $att['name']);
+                         $mailService->addStringImage(base64_decode($att['source']), $att['type'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1')); 
                      }
                      else
-                         $mailService->addStringAttachment(base64_decode($att['source']), $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+                          $mailService->addStringAttachment(base64_decode($att['source']), mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
                      
                      $message_size_total += $att['size'];
@@ -2942,8 +2942,8 @@
                                 {    
                                     $body = str_ireplace('<img src="./inc/get_archive.php?msgFolder='.$value['folder'].'&msgNumber='.$value['uid'].'&indexPart='.$value['part'].'" />' , '<img src="'.$att['name'].'" />', $body);
-                                    $mailService->addStringImage($att['source'], $att['type'], $att['name']);
+                                    $mailService->addStringImage($att['source'], $att['type'],mb_convert_encoding($att['name'], 'ISO_8859-1' , 'UTF-8,ISO_8859-1') ); 
                                 }
                                 else
-                                    $mailService->addStringAttachment($att['source'], $att['name'], $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
+                                    $mailService->addStringAttachment($att['source'], mb_convert_encoding($att['name'], 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), $att['type'], 'base64', isset($att['disposition']) ? $att['disposition'] :'attachment' );
                                  
                                 $message_size_total += $att['size']; //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg.
@@ -2953,5 +2953,6 @@
                                 $mbox_stream = $this->open_mbox($value['folder']);
                                 $rawmsg = $this->getRawHeader($value['uid']) . "\r\n\r\n" . $this->getRawBody($value['uid']);
-                                $mailService->addStringAttachment($rawmsg, base64_decode($value['name']), 'message/rfc822', '7bit', 'attachment' );
+                                 
+ 		                $mailService->addStringAttachment($rawmsg, mb_convert_encoding(base64_decode($value['name']), 'ISO-8859-1' , 'UTF-8,ISO-8859-1'), 'message/rfc822', '7bit', 'attachment' ); 
                                 $message_size_total += mb_strlen($rawmsg); //Adiciona o tamanho do anexo a variavel que controlao tamanho da msg.
                                 unset($rawmsg);
