mailio
mailio copied to clipboard
encoding problems - v2
In https://github.com/karastojko/mailio/issues/89#issuecomment-1057342052 you mentioned problems with this encoded string:
=?utf-8?Q?=D7=93=D7=99=D7=90=D7=92=D7=95_=D7=99=D7=A1?=
- which decodes (partly) to my name in Hebrew. Yes, its an RTL but it is something that you should not deal with (its a display issue only).
Take this string for example: =?UTF-8?B?15TXldeT16LXlCDXotecINeQ15kg15TXoteR16jXqiDXqtep15zXlQ==?= =?UTF-8?B?150g16rXp9eV16TXqteZINeR16rXm9eg15nXqiDXnNep15vXmdeo15nXnQ==?=
it contains a space, which means you need to start decoding and append the value to the previously decoded string. It should decode to :
הודעה על אי העברת תשלום תקופתי בתכנית לשכירים
(at least on my code, see https://github.com/elcuco/rfcpp/blob/1e15786aa5747039e3d23d516888ebe1277ed41c/rfcpp/rfc2047.cpp#L158 )
Do you have some kind of unit test for these kind of messages? Would you like a "test application" to verify these low level APIs?