ImportExport don't work with UTF-8 char

Moderator: crythias

Locked
ciotola
Znuny newbie
Posts: 35
Joined: 27 Apr 2012, 13:56
Znuny Version: 3.2.9 /3.3 / 4.0.5
Real Name: Giampiero
Company: Atos
Location: Roma - IT

ImportExport don't work with UTF-8 char

Post by ciotola »

Hi to all,
we have buil our own CI Class for sincornize OTRS with an external system.
We thinlk that we are running in a Otrs Bug because the Import done with the otrs.ImportExport module (web and via batch) does not work correctly due the fact that fields with special Char are not insert in the database.

the test file that we are using for import the data has only one two row, one with special Char and the other one no:

"Name-0001";"5722";"Gränichen";"Liebegg";"1";"xxxx, xxxxGränichen";;"IT";"651332";"243396";"IT_ID-0001";;;"IT-ORG-0001";"My description";"Production";"Operational"
"Name-0002";"5722";"Rome";"Italy";"1";"yyyy, yyyy Rome";;"IT";"651332";"243396";"IT_ID-0002";;;"IT-ORG-0002";"My description";"Production";"Operational"

The import template and mapping are correct (encoding UTF-8, column separator ";" )
- The first row is inserted but the 3rd and 6th fields are not updated in the DB
- The Second row in correctly inserted in the DB


In the Log we have:
ERROR: invalid byte sequence for encoding "UTF8": 0xe4 0x6e 0x69, SQL: 'INSERT INTO configitem_history ( configitem_id, content, create_by, create_time, type_id ) VALUES ( ?, ?, ?,

Our system configuration are:
OS Locale = en_US.UTF-8

In /opt/otrs/Kernel/System/DB/postgresql.pm
# set encoding of selected data to utf8
$Self->{'DB::Encode'} = 1;

In /opt/otrs/Kernel/Config.pm
$Self->{DefaultCharset} = 'utf-8';

Postgres configuration:
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'


In the past we had a similar error in the log, with the notification Event system not working, we solved it with a workaround found on the http://bugs.otrs.org/show_bug.cgi?id=11207

We think that is not a Postgres issue but a OTRS bug on the utf-8 encoding that must be forced.
In the specific issue that we have with the ImportExport features did anyone know where and how apply the right change? or Any Idea on how to made it works?

Thank for the support
OTRS in several version starting from 3.0

Production Environment
OTRS 4.0.5 - Postgres9.3
ITSM, KIX4OTRS, FAQ,SURVEY
OS RedHat 6.4

Auth: Ldap - CAS - DB
ciotola
Znuny newbie
Posts: 35
Joined: 27 Apr 2012, 13:56
Znuny Version: 3.2.9 /3.3 / 4.0.5
Real Name: Giampiero
Company: Atos
Location: Roma - IT

Re: ImportExport don't work with UTF-8 char

Post by ciotola »

Sorry for push up this message :(

Any suggestion?
OTRS in several version starting from 3.0

Production Environment
OTRS 4.0.5 - Postgres9.3
ITSM, KIX4OTRS, FAQ,SURVEY
OS RedHat 6.4

Auth: Ldap - CAS - DB
nedmaj
Znuny expert
Posts: 168
Joined: 26 Nov 2014, 20:34
Znuny Version: 6.3.4
Real Name: Samuel Casimiro
Company: Câmara dos Deputados
Contact:

Re: ImportExport don't work with UTF-8 char

Post by nedmaj »

I've got the same problem.
Samuel

Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Locked