Damon Liao created AIRFLOW-6505:
-----------------------------------

             Summary: Let emoji encoded properly for json.dumps()-- 
BaseSQLToGoogleCloudStorageOperator
                 Key: AIRFLOW-6505
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6505
             Project: Apache Airflow
          Issue Type: Bug
          Components: contrib
    Affects Versions: 1.10.8
         Environment: 1.10.7
            Reporter: Damon Liao
            Assignee: Damon Liao
             Fix For: 1.10.7


Emoji can't be encoded properly when ` json.dumps()` and 'UTF-8', problem fixed 
by adding parameter `ensure_ascii=False`. 

 

In 
[line|[https://github.com/apache/airflow/blob/1.10.7/airflow/contrib/operators/sql_to_gcs.py#L175]]
 BaseSQLToGoogleCloudStorageOperato.

 

For example

the emoji 🍻 encoded differentially when in use or not use  `ensure_ascii=False`.

In Use (correct UTF-8 encode): "\xf0\x9f\x8d\xbb" 

Not Use: \\ud83c\\udf7b

 

Ref: 
[https://stackoverflow.com/questions/51183947/python-json-dumps-doesnt-encode-emojis-properly]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to