wrong charset enconding with external MSSQL database

Moderator: crythias

Post Reply
rubenzsolt
Znuny newbie
Posts: 6
Joined: 02 Jan 2017, 11:26
Znuny Version: OTRS5

wrong charset enconding with external MSSQL database

Post by rubenzsolt »

I have connected an external MSSQL database for customer users, the connection is working, but the OTRS not show the corect caracters.
The MSSQL database use Hungarian_CI collation but on OTRS now show corectly the special caracters(ÜÓŐÚŰÁÉÍ).
When I connect over isql -v SERVER sa Password123 I see in database corect the special caracters, si I think somewhere OTRS is convert incorectly.
Thanks for helping
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: wrong charset enconding with external MSSQL database

Post by jojo »

Did you a conversion in the configuration? OTRS otherwise awaits utf-8 only
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
rubenzsolt
Znuny newbie
Posts: 6
Joined: 02 Jan 2017, 11:26
Znuny Version: OTRS5

Re: wrong charset enconding with external MSSQL database

Post by rubenzsolt »

Hi, I attach my config

$Self->{CustomerCompany} = {
Name => 'CustomerCompanyMSSQL',
Module => 'Kernel::System::CustomerCompany::DB',
Params => {
DSN => 'DBI:ODBC:OTRS',
Type => 'mssql',
User => 'sa',
Password => 'Password123',
Table => 'customer_company',
ForeignDB => 1,
#CaseSensitive => 0,
},

CustomerCompanyKey => 'customer_id',
CustomerCompanyValid => 'valid_id',
CustomerCompanyListFields => ['customer_id', 'name' ],
CustomerCompanySearchFields => ['customer_id', 'name'],
CustomerCompanySearchPrefix => '*',
CustomerCompanySearchSuffix => '*',
CustomerCompanySearchListLimit => 250,
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: wrong charset enconding with external MSSQL database

Post by jojo »

You should configure your ODBC driver to convert the data to utf8
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
rubenzsolt
Znuny newbie
Posts: 6
Joined: 02 Jan 2017, 11:26
Znuny Version: OTRS5

Re: wrong charset enconding with external MSSQL database

Post by rubenzsolt »

Hi, this is my odbc.ini config

[OTRS]
Driver=FreeTDS
TDS_Version=7.4
Server=192.168.10.1
Port=1433
Database=otrs
Post Reply