diff --git a/packages/node-cli/src/ApplicationConstants.js b/packages/node-cli/src/ApplicationConstants.js index 19221cbc..cddc79b8 100644 --- a/packages/node-cli/src/ApplicationConstants.js +++ b/packages/node-cli/src/ApplicationConstants.js @@ -14,6 +14,7 @@ module.exports = { SDK_CLIENT_PLATFORM: 'SuiteCloudCLIforNode.js', SDK_CLIENT_PLATFORM_JVM_OPTION: '-DclientPlatform', SDK_CLIENT_PLATFORM_VERSION_JVM_OPTION: '-DclientPlatformVersion', + SDK_FILE_ENCODING: '-Dfile.encoding=UTF-8', FILES: { PROJECT_JSON: 'project.json', HIDING_PREFERENCE: 'hiding.xml', diff --git a/packages/node-cli/src/SdkExecutor.js b/packages/node-cli/src/SdkExecutor.js index 47dfe41c..ad6f04a6 100644 --- a/packages/node-cli/src/SdkExecutor.js +++ b/packages/node-cli/src/SdkExecutor.js @@ -8,6 +8,7 @@ const { SDK_INTEGRATION_MODE_JVM_OPTION, SDK_CLIENT_PLATFORM_JVM_OPTION, SDK_CLIENT_PLATFORM_VERSION_JVM_OPTION, + SDK_FILE_ENCODING, SDK_REQUIRED_JAVA_VERSION, } = require('./ApplicationConstants'); const path = require('path'); @@ -15,7 +16,6 @@ const FileUtils = require('./utils/FileUtils'); const spawn = require('child_process').spawn; const CLISettingsService = require('./services/settings/CLISettingsService'); const EnvironmentInformationService = require('./services/EnvironmentInformationService'); -const url = require('url'); const NodeTranslationService = require('./services/NodeTranslationService'); const { ERRORS } = require('./services/TranslationKeys'); const SdkErrorCodes = require('./SdkErrorCodes'); @@ -110,7 +110,7 @@ module.exports = class SdkExecutor { } const quotedSdkJarPath = `"${this._sdkPath}"`; - const vmOptions = `${integrationModeOption} ${clientPlatform} ${clientPlatformVersionOption} ${customVmOptions}`; + const vmOptions = `${integrationModeOption} ${clientPlatform} ${clientPlatformVersionOption} ${customVmOptions} ${SDK_FILE_ENCODING}`; const jvmCommand = `java -jar ${vmOptions} ${quotedSdkJarPath} ${executionContext.getCommand()} ${cliParams}`; return spawn(jvmCommand, [], { shell: true });