cancel
Showing results for 
Search instead for 
Did you mean: 

Charsets for Imap .eml Mails not working correctly

olipage
Champ in-the-making
Champ in-the-making
Hi guys,

We have a running testsetup with latest alfresco 3.4 Community with authentication against AD, and try to establish some kind of Collaborating File/Mail Archiv. So far so good, but when trying to put mails into alfresco via imap (no attachment extraction configured) we see that the .eml does not show correctly german special umlaute.

the mail is displayed correclty in outlook. when dragging it to an alfresco mixed mode imap folder, the message does not show up correctly after being transformed to .eml

it is independent of using either outlook 2010 or thunderbird in the latest version. the mails show up with wrong in both programs

here an example:

This is a multipart message in MIME format.

——=_NextPart_000_0013_01CB984B.104BBFC0
Content-Type: text/plain;
   charset="utf-8"
Content-Transfer-Encoding: 8bit

Hi

Ok dann würde ich auch sagen

setup:
alfresco 3.4 c on ubuntu 10.04 LTS 64Bit.

Database is mysql5.

maybe i have to configure special behaviour for charset? when dragging from outlook 2010?

thanks a lot for helpful tips to further investigate on this.

Oliver Zieger

Hofburg Vienna
8 REPLIES 8

mrogers
Star Contributor
Star Contributor
Hi guys,
The message does not show up correctly after being transformed to .eml
How are you attempting to "view" the file.

loftux
Star Contributor
Star Contributor
Hi,

This may be due to the fact that determining the true character encoding is not as easy as one would expect. There is a setting in Alfresco for the default character set to use if Alfresco is unable to find out the correct one. You can try to override this by creating a file in tomcat/shared/classes/alfresco/extension. Name it something like default-encoding-context.xml and put this into it
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <!– Characterset decoder –>
   <!– Changing default character set to ISO-8859-1 instead of UTF-8 –>
    <bean id="charset.finder" class="org.alfresco.repo.content.encoding.ContentCharsetFinder">
      <property name="defaultCharset">
         <value>ISO-8859-1</value>
      </property>
      <property name="mimetypeService">
         <ref bean="mimetypeService"/>
      </property>
      <property name="charactersetFinders">
         <list>
            <bean class="org.alfresco.encoding.GuessEncodingCharsetFinder" />
         </list>
      </property>
    </bean>
        
</beans>
Change ISO-8859-1 to something else if you prefer.
This setup is in some circumstances better, it easier to detect UTF-8 than ISO-8859-1. So if it is not UTF-8, assume ISO-8859-1

I've seen some commits in HEAD that further may improve Alfresco detection algorithms in coming versions

olipage
Champ in-the-making
Champ in-the-making
hi,

ok, it is mailspecific. because there are mails that work correctly, and others not. i just found a working example for both.

the characters are display incorrectly in: alfresco explorer, preview, thunderbird/outlook native opening the .eml from cifs, and via imap from within thunderbird/outlook.

it seems at first sight, the mail that does not work was written on a mobile device, but i have to further investigate. not sure about this.

cheers,

Oliver Zieger

Hofburg Vienna

olipage
Champ in-the-making
Champ in-the-making
Hi,

This may be due to the fact that determining the true character encoding is not as easy as one would expect. There is a setting in Alfresco for the default character set to use if Alfresco is unable to find out the correct one. You can try to override this by creating a file in tomcat/shared/classes/alfresco/extension. Name it something like default-encoding-context.xml and put this into it

this should be really helpful for us. you are right with this. thanks a lot in the meantime!

Oliver Zieger

Hofburg Vienna

mrogers
Star Contributor
Star Contributor
Yes there are some character set fixes on 3.4 making their way through validation at the moment.

olipage
Champ in-the-making
Champ in-the-making
thanks for the info…

kind regards,

Oliver Zieger

Hofburg Vienna

olipage
Champ in-the-making
Champ in-the-making
hey guys,

i think i could narrow it down a little. after enabling a default charset as mentioned in one of the replies, i found out, that this happens when converting a html mail -> to plain-text mail.

all mails that do work, have been plain text mails originally!

maybe this helps somehow.

cheers, Oliver

olipage
Champ in-the-making
Champ in-the-making
hey guys,

after upgrading to 3.4c this seems to work for me 😉 - i still have the setting overriding default charset as mentioned in the posts before, but otherwise my html mails stay html mails, and special characters are showing correctly 😉

awsome, i love it…

Oliver