Unicode encoding problems

Hi! Our OTRS 1.3.2 installation runnig on Oracle is using UTF-8 as default charset, since our customer has users from several different charsets (and countries). :) We've had some problems with sending Email in UTF-8. When the characters in the email were translatable to latin-1 (or perhaps latin-15 - didn't test with €), the body of the email came through as latin-1, even though the headers insisted it was UTF-8. When the email contained characters that wouldn't translate to latin-1 (greek, chinese, czech...) it would croak with the message: Wide character in syswrite at /usr/lib/perl5/5.8.3/Net/Cmd.pm line 430.! I tried forcing it to use quoted printable, but that only seemed to move the problem: Wide character in subroutine entry at /home/virtual-http/www.elkjop.int/otrs/Kernel/cpan-lib/MIME/Decoder/QuotedPrint.pm line 74.! After a bit of digging around, Googling, and doing semi-random changes here and there, I stumbled over the Encode module, and the attached patch seems to fix our problem: I don't know if anyone else has this problem as well, or if it's our somewhat non-standard Oracle setup which is causing it, but if anyone else is seeing the same problem, it might be worth a shot. (Some of the changes in the patch is a bit unrelated to this problem, though. The "'" in the comment had to go because it messed up my editors Perl mode, and it seemed like a good idea to use the default charset as default. The most interesting bit is at the bottom.) Regards, -- Kristoffer.

Hi Kristoffer, Kristoffer Gleditsch wrote:
Our OTRS 1.3.2 installation runnig on Oracle is using UTF-8 as default charset, since our customer has users from several different charsets (and countries). :)
We've had some problems with sending Email in UTF-8. When the characters in the email were translatable to latin-1 (or perhaps latin-15 - didn't test with €), the body of the email came through as latin-1, even though the headers insisted it was UTF-8. When the email contained characters that wouldn't translate to latin-1 (greek, chinese, czech...) it would croak with the message:
Wide character in syswrite at /usr/lib/perl5/5.8.3/Net/Cmd.pm line 430.! [...]
I'm not sure how to reproduce this. Can you tell me how you get this error message? OTRS in UTF-8 mode is working fine for me. Thanks, Martin Edenhofer -- ((otrs.de)) :: OTRS GmbH :: Norsk-Data-Str. 1 :: 61352 Bad Homburg http://www.otrs.de/ :: Manage your communication!

Martin Edenhofer
I'm not sure how to reproduce this. Can you tell me how you get this error message? OTRS in UTF-8 mode is working fine for me.
I produced it by opening a ticket as a customer (didn't seem to matter whether it was done through email or customer interface), and then composing an answer to the ticket as an agent. In that email answer, I pasted in some lines of text that was obviously not possible to represent in iso-8859-1 (or -15). Plain norwegian characters ("sjåførlærerne drikker skjærgårdsøl") would just result in the text coming through as iso-8859-1 even though the headers would say it was utf-8. However, when I cut'n'pasted into the answer some text from www.ibm.gr, some from www.nec.co.jp, and some from a czech website, I got these error messages when i clicked "send". (Is it possible that the change from VARCHAR to CLOB as field type for the article body text somehow is confusing DBI and/or Perl? I didn't think that would make a difference...) Regards, -- Kristoffer.

Hi! More charset fun: Take a look at ticket #2004120310000151 in the demo.otrs.org test system. The character set of the incoming email was valid utf-8. The autoreply I got from the system can be found at http://users.linpro.no/toffer/T2004120310000151.eml . Its'a bit difficult to see because of quoted-printable, so I put a screenshot here: http://users.linpro.no/toffer/ticketanswer.png . It doesn't look right at all. :) Just concatenating the lines of the notification and the article together, as SendAgentNotification (Kernel/System/Article/Ticket.pm) does now, seems a bit optimistic, since the original article may well have a different charset than the notification. How about making a multipart-mime-mail, and just preserving the charset of each part? Regards, -- Kristoffer.

Hi!
More charset fun:
Take a look at ticket #2004120310000151 in the demo.otrs.org test system. The character set of the incoming email was valid utf-8. The autoreply I got from the system can be found at http://users.linpro.no/toffer/T2004120310000151.eml . Its'a bit difficult to see because of quoted-printable, so I put a screenshot here: http://users.linpro.no/toffer/ticketanswer.png . It doesn't look right at all. :)
Just concatenating the lines of the notification and the article together, as SendAgentNotification (Kernel/System/Article/Ticket.pm) does now, seems a bit optimistic, since the original article may well have a different charset than the notification. How about making a multipart-mime-mail, and just preserving the charset of each part? I don't know, but maybe the char-set is a property of the user,not the ticket...let's discuss it....anyone? /B
Regards, -- Kristoffer.
_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
participants (3)
-
bobsmith1@marketweighton.com
-
Kristoffer Gleditsch
-
Martin Edenhofer