Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix encoding of UTF-8 characters #796

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/node-cli/src/ApplicationConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions packages/node-cli/src/SdkExecutor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ 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');
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');
Expand Down Expand Up @@ -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 });
Expand Down