[partiallly solved] Upgrade otrs-3.3.12-01 to otrs-4.0.7-01 breaks encoding of translated strings in gui.

Moderator: crythias

Locked
zbigniew
Znuny newbie
Posts: 53
Joined: 11 Dec 2014, 13:30
Znuny Version: 5.0.23
Real Name: Zbigniew Luszpinski

[partiallly solved] Upgrade otrs-3.3.12-01 to otrs-4.0.7-01 breaks encoding of translated strings in gui.

Post by zbigniew »

Upgrade of otrs-3.3.12-01 to otrs-4.0.7-01 broke encoding of translated strings in gui. perl translator broken?

Just exported old database from CentOS5 with otrs-3.2.17-01, archived whole /opt/otrs dir. Created fresh CentOS 7.1.1503 Minimal Install machine. Then installed there otrs-3.3.12-01, overwrote /opt/otrs with archived /opt/otrs from centos5, imported database. Then done upgrade: otrs-3.2.17-01 -> otrs-3.3.12-01 -> otrs-4.0.7-01 as upgrade procedure tells. Everything went smoothly - no problems. When opened /otrs/index.pl see broken encoding of translated text in gui. However ticket content and title of tickets are correctly displayed so database output is fine.
Example of bad encoding of Polish locale:
Image
Example of good encoding of Polish locale:
Image

checked with curl verbose: Server returns in header:
Content-Type: text/html; charset=utf-8;

otrs index.pl: have in <head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8" />

pl.pm file with translation is encoded in utf8 correctly. I can read it correctly in CentOS which is utf8 ready.
Downloaded same index.pl with IE, Firefox, wget, curl so bad encoding is not browser dependent - bad characters are encoded inside file.
Downloaded index.pl from another otrs-4.0.7-01 somewhere else and it returns correct result.

executing
perl /opt/otrs/bin/cgi-bin/index.pl
also returns garbled translation however Centos 7.1 console is utf8 by default. Tried with putty set to utf-8.
/opt/otrs/Kernel/Language/pl.pm: Perl5 module source, UTF-8 Unicode text, with very long lines
Last edited by zbigniew on 04 Apr 2015, 22:24, edited 1 time in total.
zbigniew
Znuny newbie
Posts: 53
Joined: 11 Dec 2014, 13:30
Znuny Version: 5.0.23
Real Name: Zbigniew Luszpinski

[partially solved] Re: Upgrade otrs-3.3.12-01 to otrs-4.0.7-01 breaks encoding of translated strings in gui.

Post by zbigniew »

Found in OTRS 1.2 mailing list that adding:
$Self->{DefaultCharset} = 'utf-8';
to Kernel/Config.pm
will help.

This partially solves problem. In most cases there is correct encoding but sometimes garbled text jumps in suddenly. Logout/login again fixes this.
I think there must be somewhere hostile charset setting migrated from 3.3 which breaks encoding. Searched all /opt/otrs but found only utf-8 everywhere so it must be well hidden somewhere.
Locked