Malformed UTF-8 character

Moderator: crythias

Post Reply
iwill
Znuny newbie
Posts: 65
Joined: 10 Feb 2021, 10:47
Znuny Version: 6.0
Real Name: William Craveiro

Malformed UTF-8 character

Post by iwill »

Hi there,

Recently i've a system that send to OTRS emails with UTF-16 format, but as i can see, OTRS only support UTF-8 encode.
I try to change encoding format from sender application, but its not possible.
Its any way to solve that from OTRS side?

Im getting this error:
Image
liquidxtc13
Znuny newbie
Posts: 31
Joined: 30 Nov 2020, 21:13
Znuny Version: 6.4.5
Real Name: Bjoern

Re: Malformed UTF-8 character

Post by liquidxtc13 »

Hi there,

I am by no means an expert on this topic. But the common otrs setup ist roughly this: Apache -> Perl <-> MySQL (of course you cand replace Apache with nginx and replace MySQL with your DB of choice)
Apache can handle utf-16 if you configure it correctly. So can perl and MySQL. I guess if you would configure those to handle utf-16, you would get a lot closer to what you are trying to achieve. I am only loosely familiar with OTRS' source code, so I don't know if and where utf-8 is hardcoded into the code. Maybe this can be solved through a plugin? But again, I'm no expert. Just trying to nudge you in the right direction.

If you are thinking about implementing some of these measures, I would strongly advise to do this in a test environment ;-)

On the other hand this is probably a total overkill. But I utf-16 support is something we might see in the future as it is necessary to work with e.g chinese symbols and emojis.

Another option you can go for, would be to process the mail with a script before feeding it into otrs. I'm not sure if there are any hooks, that OTRS might offer. I know there is a Postmaster (Pre)Filter Module in the systemconfiguration. That could be something you work with. Another alternative could be to implement a small MTA server like postfix, which you send the email to, convert to utf-8 and then send the mail via SMTP to OTRS.

Cheers
Post Reply