Skip to content

Object.ToString() returns hex E28892 instead of D2 for minus signs on Linux #13363

@SWarnberg

Description

@SWarnberg

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.

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 '−'.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions