Problem Description
I’m experiencing an issue with the Gmail Node in n8n where Chinese characters in email subjects are not displaying correctly. Regardless of the input format I use for Chinese text, the received emails always show garbled characters in the subject line.
Environment Information
-
n8n Version: [Please fill in your version]
-
Gmail Node Version: [Please fill in version]
-
Deployment: [Docker/Self-hosted/Cloud]
-
Operating System: [Please fill in]
Issue Details
Test Cases
Input 1 (Plain Chinese Text):
Subject: "新產品促銷活動"
Input 2 (RFC2047 Encoded):
Subject: "=?UTF-8?B?5paw55Si5ZOB5L+D6Yq35rS75YuV?="
Actual Output (Both cases):
Subject: "新çÂ"¢åÂ" ä¿ƒéŠ·æ´»å‹•"
Expected Output:
Subject: "新產品促銷活動"
Analysis
The garbled output 新çÂ"¢åÂ" ä¿ƒéŠ·æ´»å‹• appears to be UTF-8 bytes being interpreted as Latin-1 characters. This suggests that the Gmail Node might be:
-
Converting Chinese text to UTF-8 bytes
-
Incorrectly treating those bytes as Latin-1 characters during email transmission
Workflow Configuration
json
What I’ve Tried
-
Direct Chinese input: Results in garbled text
-
RFC2047 encoding: Same garbled output
-
Different encoding methods: Various UTF-8 encoding approaches
-
HTML entities: Converting to numeric character references
Questions
-
Is this a known issue with the Gmail Node when handling non-ASCII characters?
-
What is the correct input format for Chinese characters in Gmail Node subjects?
-
Are there any workarounds or configuration changes that can resolve this?
-
Should I switch to HTTP Request node with Gmail API instead?
Additional Context
-
English subjects work perfectly fine
-
The email body content displays Chinese characters correctly
-
Only the subject line has this encoding issue
-
This happens consistently across different email clients (Gmail web, Outlook, etc.)
Expected Behavior
The Gmail Node should properly handle UTF-8 encoded Chinese characters in subject lines without manual encoding/decoding, similar to how it handles the email body content.
Any help or suggestions would be greatly appreciated!
