Answer the question
In order to leave comments, you need to log in
Dbmail: invalid byte sequence for encoding "UTF8"?
Sep 1 09:52:12 mail dbmail/lmtpd[25883]: Error:[sql] dbpgsql.c,db_query(+287): query failed [INSERT INTO dbmail_subjectfield (physmessage_id, subjectfield) VALUES (327605,'Хиты нед ели: Дет ский обу чающий п ланшет | Годовой запас пр езервати вов | Зеркало заднего виде + видеорег истратор | Турмалин овая маска д л<D1> ')] : [ERROR: invalid byte sequence for encoding "UTF8": 0xd120#012HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".#012]
Debian 6.0.7 x86_64
PostgreSQL 8.4.17
libgmime 2.2.25-27 // (вся ветка 2.2.x косячная, собственно всё из-за неё )
DBMail version 2.2.11
Answer the question
In order to leave comments, you need to log in
Starting from version 3.1.11 everything should work:
Fixed bug with UTF8 headers
Added UTF8 validation, invalid sequences are removed
Commit:
https://github.com/pjstevns/dbmail/commit/ada17afc...
The only anomaly that I noticed is that the parameters in the Content-Type
field
are written with a line break and the encoding is in quotation marks.
Content-Type: text/plain;
charset="windows-1251"
0xd020 is really not possible in UTF-8. Maybe the problem is in the client?
PS It would be better to present the given quotes in codes, and not in text, tk. an important component is lost (and only people who are familiar with the bug will be able to answer).
Pearl shows such a muck:
echo "?windows-1251?B?0eHw7vEg7+Dw7uv/IPP35fLt7ukg5+Dv6PHoIMzg6erw7vHu9PI=?=" | \
perl -MMIME::Base64 -ne 'print decode_base64($_)' | \
iconv -f cp1251 -t utf-8;
В)ЭЈ
5ЫќAСброс пароля учетной записи Майкрософт
echo "?windows-1251?B?0eHw7vEg7+Dw7uv/IPP35fLt7ukg5+Dv6PHoIMzg6erw7vHu9PI=?=" | perl -MMIME::Base64 -ne 'print decode_base64($_)' | od -x
0000000 29c2 a3dd 350b 9ddb d141 f0e1 f1ee ef20
0000020 f0e0 ebee 20ff f7f3 f2e5 eeed 20e9 e0e7
0000040 e8ef e8f1 cc20 e9e0 f0ea f1ee f4ee 00f2
0000057
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question