Zoho is not MIME-decoding filenames of attachments containing international characters

Zoho is not MIME-decoding filenames of attachments containing international characters

We are trying to use Zoho incoming email to form functionality and it works, but when customers attach files that contain international characters (letters with accents, etc.) then Microsoft Outlook has MIME-encoded the names of these files. Zoho totally ignores this and stores these attachments with totally wrong filenames.

One example:
This file: 
     Minikonkurranse_Bistand_til_produkteier_økonomisystemene.doc

is saved only with a totally unreadable mime-encoded name:
     =_Windows-1252_Q_Minikonkurranse_Bistand_til_produkteier_=F8konomisysteme_=_=_Windows-1252_Q_ne.doc_=

This is not only ugly, it also breaks the Zoho behavior so that such files cannot be opened in Zoho.

I have made a Python service that can mime-decode such names and here you have it so that you can try to implement the same routine inside Zoho and use it on mime-encoded international file-names. You may need to translate it to NodeJS or other languages, and for that I recommend using ChatGPT. Here is the Python version I use:

import quopri

def decode_mime_string(s):
    if '=' in s:
        start = s.find('=')
        prefix = s[:start]
        mimestring = s[start:]
        mime_elements = mimestring.split('=_=')
        decoded_text = ''
        for submime in mime_elements:
            charset, encoded_text = submime.strip('=_').strip('_=').split('_Q_', 1)
            decoded_text += quopri.decodestring(encoded_text).decode(charset)
        return prefix + decoded_text
    else:
        return s

Hope to see a fix for this bug soon!

Best regards,
Eirik Y. Øra, +47   919 06 353

    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now