sqlcmd running into unicode conversion issues on SLES12SP5

Viewed 456

I have a SLES12-SP5 docker container running and I followed the instructions here : https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15#suse17 to install mssql-tools.

When i try running mssql-tools, I get the following error:

c1dd384365b5:/ # /opt/mssql-tools/bin/sqlcmd
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Driver's SQLAllocHandle on SQL_HANDLE_HENV failed.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Can't initiate unicode conversion.

Is there a setting I am missing?

2 Answers

Make sure the package glibc-locale is installed. You can also check the output of the locale command.

Before:

LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
...

After:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
...
Related