From a0d6b8607093596a40bb417121645fc77059969e Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Tue, 8 Nov 2022 15:11:56 -0500 Subject: [PATCH] Flip log codepage on zos Signed-off-by: 1000TurquoisePogs --- bin/libs/common.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/libs/common.ts b/bin/libs/common.ts index 1735d748e5..9e211db879 100644 --- a/bin/libs/common.ts +++ b/bin/libs/common.ts @@ -14,8 +14,8 @@ import * as os from 'os'; import * as xplatform from 'xplatform'; import * as fs from './fs'; -//import * as stringlib from './string'; -import * as shell from './shell'; +import * as stringlib from './string'; +//import * as shell from './shell'; import * as strftime from './strftime'; import * as bufferlib from './buffer'; declare namespace console { @@ -154,8 +154,7 @@ function writeLog(message: string): boolean { if (logFile===undefined || logFile===null) { return false; } else { - //TODO this does utf8. should we flip it to 1047 on zos? - logFile.puts(message); + logFile.puts(os.platform == 'zos' ? stringlib.asciiToEbcdic(message) : message); return true; } }