mgustimz opened a new pull request, #66577:
URL: https://github.com/apache/airflow/pull/66577

   ## Description
   
   When retrieving email attachments using the IMAP hook, filenames containing 
non-ASCII characters (e.g. Cyrillic) are returned in RFC 2047 encoded format 
instead of properly decoded Unicode strings.
   
   
   **Example:**
   - Raw: 
`=?UTF-8?B?0J/QtdGA0LXRh9C10L3RjCDRgtC+0YfQtdC6INC/0YDQvtC00LDQtl8yMDI2LTA0LTIxLnhsc3g=?=`
   - Expected: `Перечень точек продаж_2026-04-21.xlsx`
   
   ## Fix
   
   Adds `_decode_filename()` to `MailPart` class that uses 
`email.header.decode_header` to properly decode RFC 2047 encoded filenames. 
Applied in `has_matching_name()`, `has_equal_name()`, and `get_file()`. Plain 
ASCII filenames pass through unchanged.
   
   ## Related Issue
   Fixes #65871


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to