Hello List!
I use OTRS with POSTGRESQL where the otrs database defined as "UNICODE".
I need OTRS to support messages in hebrew language (that was the main
reason for UNICODE database).
When i send a hebrew message encoded in UTF-8 everything is fine.
The problem is that (almost) nobody uses that encoding to send e-mail ,
vast majority of people use "Windows-1255" and
minority use "iso-8859-8" (for unkown to me reasons mozilla-mail sends
hebrew mail in "iso-8859-8-i" encoding).
When one of these encodings (win || iso) hits otrs@mydomain the
following happens:
<log extract><snip>
procmail: Executing "/opt/otrs//bin/PostMaster.pl"
DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding
"UNICODE": 0xed20e7 a
t /opt/otrs/Kernel/System/DB.pm line 172.
ERROR: OTRS-PM-10 Perl: 5.8.2 OS: linux Time: Tue Jan 13 02:21:47 2004
Message: ERROR: invalid byte sequence for encoding "UNICODE":
0xed20e7, SQL: 'INSERT
INTO article (ticket_id, article_type_id, article_sender_type_id,
a_from, a_reply_to,
a_to, a_cc, a_subject, a_message_id, a_body, a_content_type,
content_path, valid_id,
incoming_time, create_time, create_by, change_time, change_by) VALUES
(5, 1, 3, 'Bo
ris Ratner ', '', 'otrs@ratner.mine.nu', '', 'שלום
חבר', '<40033
A37.1020402@ratner.mine.nu>', 'שלום אח שלי יקר!
', 'text/plain; charset=ISO-8859-8-I; format=flowed', '2004/01/13', 1,
1073953307, cu
rrent_timestamp, 1, current_timestamp, 1)'
Traceback (19772):
Module: Kernel::System::Ticket::Article::CreateArticle (v1.27.2.3)
Line: 97
Module: Kernel::System::PostMaster::NewTicket::Run (v1.38.2.1) Line: 107
Module: Kernel::System::PostMaster::Run (v1.31.2.3) Line: 209
Module: /opt/otrs//bin/PostMaster.pl (v1.13.2.2) Line: 99
ERROR: OTRS-PM-10 Perl: 5.8.2 OS: linux Time: Tue Jan 13 02:21:47 2004
Message: No last customer article found!
</snip>
No ticket/article is created and i can't tell for sure if any
notification on "you missed an e-mail" was sent.
If i send an utf-8 email with attachment in content type
"message/rfc822" encoded with non-utf8 hebrew encoding i get the
following in the logs:
<snip>
procmail: Executing "/opt/otrs//bin/PostMaster.pl"
DBD::Pg::db do failed: ERROR: invalid byte sequence for encoding
"UNICODE": 0xed20e0 at /opt/otrs/Kernel/System/DB.pm line 172.
ERROR: OTRS-PM-10 Perl: 5.8.2 OS: linux Time: Sat Jan 17 09:32:58 2004
Message: ERROR: invalid byte sequence for encoding "UNICODE":
0xed20e0, SQL: 'INSERT INTO article_plain (article_id, body,
create_time, create_by, change_time, change_by)
</snip>
in this case a new ticket is created BUT the only attachemnt i can see
is the subject of the attached .eml file.
POSSIBLE SOLUTION
Now i'm working on a script to be run before ../bin/Postmaster.pl that
will convert _ALL_ incoming mail to UTF-8.
IMHO there is no need for ORTS to handle encodings internally - unicode
works great.
Please let me know on any suggestions in this matter.
How does MySQL handles the same problems?
Kind Regards,
Boris Ratner.