-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Description
Issue Title
Invalid unicode character is returned by Object.ToString() when running on Linux for minus.
General
When using Object.ToString() on an object of type Int16, Int32 etc, with a negative value, for instance -32, the return value is "-32". However, this method behaves differently on Windows and Linux, which causes problems when forwarding this string to another environment, for instance SQL Server.
- On Windows, the minus sign is of hex code 2D (Hyphen minus), see https://www.fileformat.info/info/unicode/char/2d/index.htm.
- On Linux, the minus sign is of hex code E28892, see https://www.fileformat.info/info/unicode/char/2212/index.htm.
This causes problems, for instance when passing a SQL statement to another machine (on Windows) in SQL Server. E28892 is not considered as a negative number in SQL Server. When following is executed:
EXEC sp_myproc @mydata = -32
then the following error message is returned:
Incorrect syntax near '−'.
Reactions are currently unavailable