UTF-7 format inbound attachments

Javier Tirado1
Tera Guru

I bring a strange topic (and I say strange because I haven't managed to find much cases around the internet).

In the instance of my company there is a process through interactions. This process starts with the vendor sending an invoice to an internal employee, then this employee forwards the email to servicenow@company.com  to send it to the SN instance and an Interaction record is created.

Since Xanadu upgrade, we started noticing some of these invoices attachments were corrupted on the Interaction records. Instead of a pdf file attached to the record, there was a file with name " =?utf-7?B?RmFjdHVyZSBuK0FMQS0gMjUwMzU4ODIuUERG?= " while the original pdf file was named "Invoice nº1234567".

JavierTirado1_0-1743008918321.png

I started investigations, which has not solved the problem but has clarified a bit the situation. This string offen appears when a system does not translate a non-ASCII character (I've found a similar string in some email subjects as well), so I saw it clear, the problem was the º character. But ServiceNow should be translating it anyhow. Why I say that? Because I've tried to upload the same pdf through different methods and it got uploaded fine: tried uploading directly to the record, pdf is fine; tried sending it through an email to the servicenow address, pdf is loaded fine.

So the only thing that could be happening is that anyhow, while being forwarded, the translation goes wrong in ServiceNow...

The headers of the corrupted attachment's mails look like this:

JavierTirado1_1-1743009300479.png

I have to remark that this happens with a specific vendor. There are isolated cases with other vendors but specifically one (which uses "Invoice nº 1234567" as file name) is causing it. The reason is so obviously the special character, but I cannot understand why it just happens to fail when the employee is forwarding the vendor's email, and not when I send it through mail or upload to the record directly. I even saw a difference on the º character that I can write with my keyboard and the original one:

JavierTirado1_2-1743009704352.png

(I changed original pdf text just for display, but the º character is the original)

 

This topic is getting frustrating so I would appreciate some help from the community to solve this mistery.

1 ACCEPTED SOLUTION

Javier Tirado1
Tera Guru

Official response from ServiceNow is that UTF-7 is a non-supported charset (although other emails with this encoding where passed). The solution is to head to the source of the email and see why this encoding is being used, changing it if possible to UTF-8.

View solution in original post

1 REPLY 1

Javier Tirado1
Tera Guru

Official response from ServiceNow is that UTF-7 is a non-supported charset (although other emails with this encoding where passed). The solution is to head to the source of the email and see why this encoding is being used, changing it if possible to UTF-8.