It might be a stupid question, but ... here it is!
I wrote my own MIME parser in my native C ++. This is a nightmare with encodings! It has been stable for the last 3 months or so, but I recently noticed this Subject: header .
Subject: =?UTF-8?B?T2ZpY2luYSBkZSBJbmZvcm1hY2nDs24sIEluaWNpYXRpdmFzIHkgUmVjbGFt?
which should decode:
Subject: Oficina de Información, Iniciativas y Reclamaciones
The problem is that there is one additional = (equal) in which I cannot understand the bindings of two (why 2?) Encoded elements, which I do not understand why they are separated. Theoretically, the format should be: =?charset?encoding?encoded_string?= , But another object was found starting with two = .
==?UTF-8?B?blahblahlblah?=
How do I handle extra = ?
Could I replace ==? on =? (it's me) before doing anything (and it works) ... but I wonder if there is any specification regarding this so that I don't chop my way into the correct functionality.
PS : How much I hate these relic protocols! All text messages must be UTF-8 and XML :)
source share