Share via

sqlcmd get wrong value on linux(centos 7)

model3 1 Reputation point
2022-03-30T02:18:54.107+00:00

try to get a big text from server,
same datasouce(sqlsever 2014),
same sql (Select sTXTContent from NEMR_Doc where iid = 7693389),
but get wrong value on linux, how to fix?
part of the return value were wrong coded, see the screenshot.

I have tried chenge ODBC Driver for SQL Server 17 to ODBC Driver for SQL Server 18,but it had no effec.

This problem has bothered me for several days,thank you for your answer!
188088-sqlserver%E9%94%99%E8%AF%AF.png

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


2 answers

Sort by: Most helpful
  1. Erland Sommarskog 134.7K Reputation points MVP Volunteer Moderator
    2022-03-30T21:59:42.067+00:00

    Just a wild guess, but any of the characters that get rendered incorrectly be beyond the Unicode base plane, That is, U+10000 or greater?

    Please bear with me. I don't know Chinese, so I am not able to say whether any of these characters are beyond the normal usage of Chinese.

    Was this answer helpful?

    0 comments No comments

  2. Olaf Helper 47,621 Reputation points
    2022-03-30T05:49:05.95+00:00

    If you post your question over several forums, then please link them to avoid have community more work the neccessary.
    See my answer on
    https://techcommunity.microsoft.com/t5/sql-server/sqlcmd-get-wrong-value-on-linux-centos-7/m-p/3271029

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.