holistics / holistics/dbml

mssqlConnector producing badly encoded chars

Open
#722 1 comment 0 reactions 1 assignee Assigned to @huyleminh01 View on GitHub
bug
Dominant language
JavaScript
Stars
3.7k
Forks
233
Avg merge
1d 23h
Merged PRs (30d)
4

Description

Hi guys,

I'm using the `connector.fetchSchemaJson(connection, 'mssql');` to get my DB scripted.
Works fine except it outputs badly encoded chars.

eg german: `f�r` instead of `für`, `Integrit�t` for `Integrität`

I can trace the problem coming from the tedicious mssql package, with this p.o.c. :
```js
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);
}
})()
```
output the same encoding problem.

Any idea ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.