diff --git a/package-lock.json b/package-lock.json index f83f1837..803da502 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pro-bro", - "version": "1.8.0", + "version": "1.9.1-dev", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pro-bro", - "version": "1.8.0", + "version": "1.9.1-dev", "dependencies": { "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0", @@ -19,6 +19,7 @@ "faker": "^5.5.3", "fs": "^0.0.1-security", "html-webpack-plugin": "^5.5.3", + "iconv-lite": "^0.6.3", "path": "^0.12.7", "raw-loader": "^4.0.2", "react": "^18.1.0", @@ -7133,6 +7134,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", @@ -11971,6 +11983,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 45964db7..fc2dbaa5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "DB", "Explorer" ], - "version": "1.9.0", + "version": "1.9.1-dev", "repository": { "type": "git", "url": "https://github.com/BalticAmadeus/ProBro" @@ -428,6 +428,7 @@ "faker": "^5.5.3", "fs": "^0.0.1-security", "html-webpack-plugin": "^5.5.3", + "iconv-lite": "^0.6.3", "path": "^0.12.7", "raw-loader": "^4.0.2", "react": "^18.1.0", @@ -438,4 +439,4 @@ "reactjs-popup": "^2.0.5", "uuid": "^9.0.0" } -} \ No newline at end of file +} 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..c903fb39 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; @@ -24,15 +25,19 @@ export class AClient { () => { console.log( 'V2: TCP connection established with the server at ' + - this.connectionParams.port.toString() + - '.' + this.connectionParams.port.toString() + + '.' ); } ); 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; + //console.log('V2: Data:', a); if (this.data.endsWith('\n')) { this.dataFinish(this.data); console.log('V2: Data finish');