[jira] Created: (OFBIZ-1083) use UTF-8 encoding for emails

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
use UTF-8 encoding for emails
-----------------------------

                 Key: OFBIZ-1083
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
             Project: OFBiz
          Issue Type: Improvement
          Components: content
    Affects Versions: SVN trunk, Release Branch 4.0
            Reporter: Thomas Herzog
             Fix For: SVN trunk, Release Branch 4.0


Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
This patch sets the encoding to UTF-8 and solves above problems.
The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.

The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.

Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Herzog updated OFBIZ-1083:
---------------------------------

    Attachment: EmailServices.diff

set email encoding to UTF-8 for text mime types

> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EmailServices.diff
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506952 ]

Christian Geisert commented on OFBIZ-1083:
------------------------------------------

I was also looking a this bug some days ago.

The problem depends on the file encoding of the platform (Special characters were ok on my workstation with iso-8559-15 encoding but were wrong on our server which runs with utf-8 encoding).
I was working on a fix with a content.getBytes("utf-8") in the StringDataSource and a setting the "Content-Type of text/html; charset=UTF-8" but haven't tested it that much.


A first test with the patch from Thomas was successful, will do some more testing tomorrow.


> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EmailServices.diff
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Herzog updated OFBIZ-1083:
---------------------------------

    Attachment:     (was: EmailServices.diff)

> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk, Release Branch 4.0
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Herzog updated OFBIZ-1083:
---------------------------------

    Attachment: EmailServices.java.diff

This new patch additionally sets the mail subject encoding to "UTF-8"

> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EmailServices.java.diff
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508182 ]

Christian Geisert commented on OFBIZ-1083:
------------------------------------------

I've done some more testing and the patch works as expected.
+1 for committing it to trunk and release branch.

> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EmailServices.java.diff
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato reassigned OFBIZ-1083:
----------------------------------------

    Assignee: Jacopo Cappellato

> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>            Assignee: Jacopo Cappellato
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EmailServices.java.diff
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-1083) use UTF-8 encoding for emails

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-1083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1083.
----------------------------------

    Resolution: Fixed
      Assignee: Jacques Le Roux  (was: Jacopo Cappellato)

Thanks Thomas and Christian,

The patch is in trunk rev. 566428, release4.0 rev. 566429

> use UTF-8 encoding for emails
> -----------------------------
>
>                 Key: OFBIZ-1083
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1083
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Thomas Herzog
>            Assignee: Jacques Le Roux
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: EmailServices.java.diff
>
>
> Sent Emails are currently encoded with us-ascii charset. This means the € sign is displayed as ?, other special characters are not displayed.
> This patch sets the encoding to UTF-8 and solves above problems.
> The StringDataSource class, which is embedded into EmailServices class, is no longer referenced and can be removed.
> The UTF-8 email characterset is hardcoded twice. A possible improvement is to use java.nio.charset.Charset.defaultCharset().toString(), which returns UTF-8 in my case. Additionally you could overwrite the default settings with a mail.charset property in the "general.properties" file.
> Thomas

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.