Skip to content

Badly encoded characters output when querying sys.extended_properties #1740

@giswa

Description

@giswa

Hi guys,

I'm getting badly encoded chars specifically when I use the sys.extended_properties table.

I get german: f�r instead of für, Integrit�t for Integrität
Using this code as a test :

const sql = require('mssql');
const fs = require("node:fs");

(async () => {
    try {
        // make sure that any items are correctly URL encoded in the connection string
        await sql.connect('...')
        const result = await sql.query`SELECT top 10 * FROM sys.extended_properties`
        fs.writeFileSync('extended-properties.json', JSON.stringify(result , null, 2));
    } catch (err) {
        console.error(err);
    }
})()

On all other user tables, there are no encoding problems
My DB collation is Latin1_General_CI_AI

Any idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions