{"record":{"id":"3ab498682ff8f018","repo":"n8n-io/n8n","slug":"unknown-encoding-encoding","errorCode":null,"errorMessage":"Unknown encoding ${encoding}","messagePattern":"Unknown encoding (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/imap/src/part-data.ts","lineNumber":36,"sourceCode":"\n\t\tif (encoding === 'QUOTED-PRINTABLE') {\n\t\t\treturn new QuotedPrintablePartData(data, charset);\n\t\t}\n\n\t\tif (encoding === '7BIT') {\n\t\t\treturn new SevenBitPartData(data);\n\t\t}\n\n\t\tif (encoding === '8BIT' || encoding === 'BINARY') {\n\t\t\treturn new BinaryPartData(data, charset);\n\t\t}\n\n\t\tif (encoding === 'UUENCODE') {\n\t\t\treturn new UuencodedPartData(data);\n\t\t}\n\n\t\t// if it gets here, the encoding is not currently supported\n\t\tthrow new Error('Unknown encoding ' + encoding);\n\t}\n}\n\nexport class Base64PartData extends PartData {\n\tconstructor(data: string) {\n\t\tsuper(Buffer.from(data, 'base64'));\n\t}\n}\n\nexport class QuotedPrintablePartData extends PartData {\n\tconstructor(data: string, charset?: string) {\n\t\tconst decoded =\n\t\t\tcharset?.toUpperCase() === 'UTF-8' ? utf8.decode(qp.decode(data)) : qp.decode(data);\n\t\tsuper(Buffer.from(decoded));\n\t}\n}\n\nexport class SevenBitPartData extends PartData {","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/imap/src/part-data.ts#L18-L54","documentation":"PartData.fromData dispatches on the MIME encoding token and handles QUOTED-PRINTABLE, 7BIT, 8BIT/BINARY, BASE64 and UUENCODE; anything else reaches the final else and throws. The message echoes the unrecognized encoding token from the email part's Content-Transfer-Encoding header — the guard means 'this decoder set doesn't implement that encoding', typically from a malformed or exotic header.","triggerScenarios":"Thrown at packages/@n8n/imap/src/part-data.ts:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the raw part's Content-Transfer-Encoding header for damage or non-standard tokens (case/whitespace variants)","Treat the part as plain text or base64 manually if the body is known to be one of those","File an issue to add support for the encoding if it is a legitimate standard one"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}