Menu

#816 Unicode support for the Microsoft SQL driver does not work

4.8.1
closed-fixed
nobody
None
5
2025-02-22
2021-09-10
HyP3r
No

As far as I understand it, there are two ways to get Unicode characters into the database with Microsoft SQL:

  • You use a varchar column (each character has 1 byte), then use a UTF-8 collation. This function is only available since SQL Server 2019.
  • You can use a nvarchar column (each character has 2 bytes).
    Then in the second step, I think you always have to use the N prefix for strings in SQL queries. For example:
    UPDATE foo SET bar = N'д'; (please note the Russian Unicode character as an example).

I have looked at the code from Adminer and the preparation of strings is not given in the driver so solving this is not so easy. Otherwise I would have made a pull request.

Discussion

  • Jakub Vrána

    Jakub Vrána - 2025-02-22
    • status: open --> closed-fixed
     
  • Jakub Vrána

    Jakub Vrána - 2025-02-22

    This should be fixed by 4bc9a29.

     

Log in to post a comment.