Problems writing special chars into mssql (latin1)

Moderator: crythias

Post Reply
OTRS newbie
Posts: 2
Joined: 04 Jan 2012, 11:36
OTRS Version?: 3.0.11
Real Name: Alexis

Problems writing special chars into mssql (latin1)

Post by WayneJohn »

Hi all!

After getting no answer in the german part I will try my luck it in here :)
At first short description of the System:
Otrs-Server: GNU/Linux with lokalem Mysql server and Otrs: 3.0.11
Freetds with ODBC for a MSsql-Connect to another server

We have outsourced the Customer-Data into the mssql-DB witch also should be writable. So the thing that the mssql has charset latin1 and otrs uses utf-8.
Reading Special-Chars from mssql is no Problem, but writing them brings problems. Eg: hallüäö goes to hallüäö

I am a bit desperate about that. I tried so many possible ways:
Settting Source to: iso-8859-1 -> Only question marks will be set instead of those chars (hallüäö-->hall???)
Putting N as Prefix into */Kernel/System/CustomerUser/ (= "N'" . $Self->{DBObject}->Quote( $Param{ $Entry->[0] } ) . "'";), Line 721
dosnt change anithing at all!
A part of the we set up:

Code: Select all

 $Self->{CustomerUser1} = {
        Name   => 'Ivy Database Connect',
        Module => 'Kernel::System::CustomerUser::DB',
           Params => {
            DSN => 'DBI:ODBC:MSSQL-OTRS3',
         SourceCharset => 'iso-8859',
         DestCharset => 'utf-8',
            User => 'rr',
         Type => 'mssql',
         Password =>'bb',
         Table => 'otrsCustomerData',
            CaseSensitive => 0,
        },     #mapping ...
#...and at the end of the config:
    $Self->{'DefaultCharset'} = 'utf-8';
If you need more information don't hesitate to ask.
I would be very thankful if you could help me out of this mess. Everything else is working fine!

Best regards JW

OTRS ninja
Posts: 723
Joined: 10 Oct 2007, 14:30
OTRS Version?: 3.0
Location: Hamburg, Germany

Re: Problems writing special chars into mssql (latin1)

Post by ferrosti »

Find out which charset this MSSQL servers table is of and insert this into the source charset configuration.
In case your MS SQL server uses ISO encoding in this case make sure you use 'ISO-8859-1' or whichever you need, but you are missing the -1 part.
Since it seems you have an extra table for you user data it would be the best to set MS SQL to use UTF-8 for this table.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems

Post Reply