You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Alan Ma (JIRA)" <ji...@apache.org> on 2018/05/01 22:17:00 UTC

[jira] [Assigned] (AIRFLOW-1914) email utils in airflow in airflow does not support multibyte string content

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

Alan Ma reassigned AIRFLOW-1914:
--------------------------------

    Assignee: Alan Ma

> 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)