airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-1914) email utils in airflow in airflow does not support multibyte string content
Date Sun, 06 May 2018 09:18:00 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465035#comment-16465035
] 

ASF subversion and git services commented on AIRFLOW-1914:
----------------------------------------------------------

Commit 08ac473a47c92d877c6c71f9af437846888a1aa8 in incubator-airflow's branch refs/heads/v1-10-test
from Alan Ma
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=08ac473 ]

[AIRFLOW-1914] Add other charset support to email utils

The built-in email utils does not support
multibyte string content, for example,
Japanese or emojis. The fix is to add
mime_charset parameter to allow for other
values such as `utf-8`.

Closes #3308 from wolfier/AIRFLOW-1914

(cherry picked from commit c0cf73d27bb764e53f3b61ba66d1d370326e466c)
Signed-off-by: Fokko Driesprong <fokkodriesprong@godatadriven.com>


> email utils in airflow in airflow does not support multibyte string content
> ---------------------------------------------------------------------------
>
>                 Key: AIRFLOW-1914
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1914
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: operators
>    Affects Versions: Airflow 2.0
>            Reporter: edward
>            Assignee: Alan Ma
>            Priority: Major
>              Labels: email
>
> The built-in email utils does not support multibyte string content, for example, Japanese.
> issue in file: https://github.com/apache/incubator-airflow/blob/master/airflow/utils/email.py#L73
> >>> mime_text = MIMEText(html_content, 'html')
> The charset is not passed in and the default charset is "us-ascii"
> The fix is to pass in the right charset base on html_context:
> >>> mime_text = MIMEText(html_content, 'html’, “us-ascii" if isinstance(html_content,
str) else "utf-8”)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message