diff --git a/package-lock.json b/package-lock.json index 070d682a..e7948a90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "faker": "^5.5.3", "fs": "^0.0.1-security", "html-webpack-plugin": "^5.5.3", + "iconv-lite": "^0.6.3", "jsonminify": "^0.4.2", "path": "^0.12.7", "raw-loader": "^4.0.2", @@ -7140,6 +7141,17 @@ "node": ">=10.17.0" } }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/icss-utils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", @@ -11987,6 +11999,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", diff --git a/package.json b/package.json index 513e999e..a4f40020 100644 --- a/package.json +++ b/package.json @@ -429,6 +429,7 @@ "faker": "^5.5.3", "fs": "^0.0.1-security", "html-webpack-plugin": "^5.5.3", + "iconv-lite": "^0.6.3", "jsonminify": "^0.4.2", "path": "^0.12.7", "raw-loader": "^4.0.2", diff --git a/resources/oe/src/oeCore.i b/resources/oe/src/oeCore.i index af2d3080..ace2ef6a 100644 --- a/resources/oe/src/oeCore.i +++ b/resources/oe/src/oeCore.i @@ -63,6 +63,8 @@ FUNCTION CREATE_DEBUG RETURNS Progress.Json.ObjectModel.JsonObject (tmpDate AS D jsonDebug:Add(SUBSTITUTE("start&1", cProcedure), tmpDate). jsonDebug:Add(SUBSTITUTE("end&1", cProcedure), NOW). jsonDebug:Add(SUBSTITUTE("time&1", cProcedure), NOW - tmpDate). + jsonDebug:Add(SUBSTITUTE("cpstream&1", cProcedure), SESSION:CPSTREAM). + jsonDebug:Add(SUBSTITUTE("cpinternal&1", cProcedure), SESSION:CPINTERNAL). RETURN jsonDebug. END FUNCTION. diff --git a/src/repo/client/AClient.ts b/src/repo/client/AClient.ts index 26d4f4fc..8eb2090e 100644 --- a/src/repo/client/AClient.ts +++ b/src/repo/client/AClient.ts @@ -1,5 +1,6 @@ import * as Net from 'net'; import { ConnectionParams } from '../../view/app/model'; +import { decode } from 'iconv-lite'; export class AClient { protected connectionParams: ConnectionParams; @@ -32,7 +33,10 @@ export class AClient { this.client.on('data', (chunk) => { console.log('V2: Data received from the server'); - this.data += chunk.toString(); + // eslint-disable-next-line no-control-regex + const a = decode(chunk, 'windows-1252').replace(/\x00+$/, ''); + + this.data += a; if (this.data.endsWith('\n')) { this.dataFinish(this.data); console.log('V2: Data finish'); diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index 56bd2595..b9655cd3 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -184,6 +184,7 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { }; const handleData = (message: any) => { + console.log('MY LOG' + message.data.columns); if (message.data.error) { setErrorObject({ error: message.data.error,