Поставил OTRS на сервер. UTM стоит на FreeBSD.
К базе юзеров подключается нормально но вот с кодировкой проблемы. Заместо русских букв выводит Попов кракозябры.
В обоих системах кодировка UTF8. не могу понять как из базы UTM получить нормальную кириллицу. Пробовал подключатся к базе NaviCat, тоже лезут такие же кракозябры. Помогите разобраться.
Совмещал так:
после
Код: Выделить всё
$Self->{'LogModule'} = 'Kernel::System::Log::File';
$Self->{'LogModule::LogFile'} = 'D:/otrs/OTRS/var/log/otrs.log';
Код: Выделить всё
# --------------------------------------------------- #
# #
# Start of config options!!! #
# CustomerUser stuff #
# #
# --------------------------------------------------- #
# CustomerUser
# (customer user database backend and settings)
$Self->{CustomerUser} = {
Name => 'UTM Users',
Module => 'Kernel::System::CustomerUser::DB',
Params => {
# if you want to use an external database, add the
# required settings
# DSN => 'DBI:odbc:yourdsn',
# Type => 'mssql', # only for ODBC connections
DSN => 'DBI:mysql:database=UTM5;host=Имя сервера с UTM;user=root;password=',
#User => 'OTRS',
#Password => '',
Table => 'users',
# Table => 'customer_users',
# if your frontend is unicode and the charset of your
# customer database server is iso-8859-1, use these options.
SourceCharset => 'utf8',
DestCharset => 'utf-8',
# CaseSensitive will control if the SQL statements need LOWER()
# function calls to work case insensitively. Setting this to
# 1 will improve performance dramatically on large databases.
CaseSensitive => 0,
},
# customer unique id
CustomerKey => 'login',
# customer #
CustomerID => 'customer_id',
CustomerValid => 'valid_id',
CustomerUserListFields => [ 'full_name', 'login', 'home_telephone' ],
# CustomerUserListFields => ['login', 'first_name', 'last_name', 'customer_id', 'email'],
CustomerUserSearchFields => ['login', 'full_name'],
#CustomerUserSearchPrefix => '*',
#CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 300,
#CustomerUserPostMasterSearchFields => ['email'],
CustomerUserNameFields => [ 'full_name' ],
#CustomerUserEmailUniqCheck => 1,'login', , 'id'
# # show now own tickets in customer panel, CompanyTickets
# CustomerUserExcludePrimaryCustomerID => 0,
# # generate auto logins
# AutoLoginCreation => 0,
# # generate auto login prefix
# AutoLoginCreationPrefix => 'auto',
# # admin can change customer preferences
# AdminSetPreferences => 1,
# # use customer company support (reference to company, See CustomerCompany settings)
# CustomerCompanySupport => 1,
# cache time to live in sec. - cache any database queries
# CacheTTL => 60 * 60 * 24,
# # just a read only source
# ReadOnly => 1,
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
# [ 'UserTitle', 'Title', 'title', 1, 0, 'var', '', 0 ],
[ 'UserFirstname', 'Firstname', 'full_name', 1, 1, 'var', '', 0 ],
# [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', '', 0 ],
[ 'UserLogin', 'login', 'login', 1, 1, 'var', '', 0 ],
# [ 'UserPassword', 'Password', 'pw', 0, 0, 'var', '', 0 ],
[ 'UserEmail', 'Email', 'email', 1, 1, 'var', '', 0 ],
# [ 'UserEmail', 'Email', 'home_telephone', 1, 1, 'var', '$Env{"CGIHandle"}?Action=AgentTicketCompose;ResponseID=1;TicketID=$Data{"TicketID"};ArticleID=$Data{"ArticleID"}', 0, '', 'AsPopup OTRSPopup_TicketAction' ],
[ 'UserCustomerID', 'CustomerID', 'id', 0, 1, 'var', '', 0 ],
# [ 'UserCustomerIDs', 'CustomerIDs', 'customer_ids', 1, 0, 'var', '', 0 ],
[ 'UserPhone', 'Phone', 'home_telephone', 1, 0, 'var', '', 0 ],
[ 'UserFax', 'Fax', 'work_telephone', 1, 0, 'var', '', 0 ],
[ 'UserMobile', 'Mobile', 'mobile_telephone', 1, 0, 'var', '', 0 ],
[ 'UserStreet', 'Street', 'actual_address', 1, 0, 'var', '', 0 ],
# [ 'UserZip', 'Zip', 'zip', 1, 0, 'var', '', 0 ],
# [ 'UserCity', 'City', 'city', 1, 0, 'var', '', 0 ],
# [ 'UserCountry', 'Country', 'country', 1, 0, 'var', '', 0 ],
[ 'UserComment', 'Comment', 'comments', 1, 0, 'var', '', 0 ],
# [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', '', 0 ],
],
# default selections
Selections => {
# UserTitle => {
# 'Mr.' => 'Mr.',
# 'Mrs.' => 'Mrs.',
# },
},
};