W
W
warinsoul2021-05-17 09:08:13
Django
warinsoul, 2021-05-17 09:08:13

How to fix DB2 encoding error?

Good afternoon. There is a project on Django The database is DB2 on a test environment on a Windows 2016 server IIS works fine, but when it is transferred to a Linux server (Apache), the encoding breaks and the error SQL0332N Character conversion from the source code page "1251" to the target comes from the database server code page "819" is not supported. SQLCODE=-332. Changed locales, changed environment variables on the advice of IBM. It is not possible to change the codepage on the server for the database. Are there any other solutions? Is it necessary to generate a cfg file for clidriver?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
warinsoul, 2021-05-18
@warinsoul

The problem was solved by redefining the environment variables of the service httpd
sudo systemctl edit httpd.service:
[Service]
EnvironmentFile=/etc/environment
file /etc/environment:
IBM_DB_HOME=/PATH/TO/clidriver
LD_LIBRARY_PATH=/PATH/TO/clidriver/lib
LANG=ru_RU .CP1251

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question