summaryrefslogtreecommitdiff
path: root/js/src/Ice/Instance.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/Ice/Instance.js')
-rw-r--r--js/src/Ice/Instance.js25
1 files changed, 24 insertions, 1 deletions
diff --git a/js/src/Ice/Instance.js b/js/src/Ice/Instance.js
index df3a67a8947..f521ec74499 100644
--- a/js/src/Ice/Instance.js
+++ b/js/src/Ice/Instance.js
@@ -36,7 +36,8 @@ Ice.__M.require(module,
"../Ice/LocalException",
"../Ice/Exception",
"../Ice/ProcessLogger",
- "../Ice/ACM"
+ "../Ice/ACM",
+ "../Ice/ToStringMode"
]);
const IceSSL = Ice.__M.require(module, ["../Ice/EndpointInfo"]).IceSSL;
@@ -80,6 +81,7 @@ class Instance
this._messageSizeMax = 0;
this._batchAutoFlushSize = 0;
this._clientACM = null;
+ this._toStringMode = Ice.ToStringMode.Unicode;
this._implicitContext = null;
this._routerManager = null;
this._locatorManager = null;
@@ -247,6 +249,12 @@ class Instance
return this._clientACM;
}
+ toStringMode()
+ {
+ // this value is immutable
+ return this._toStringMode;
+ }
+
getImplicitContext()
{
return this._implicitContext;
@@ -347,6 +355,21 @@ class Instance
new ACMConfig(this._initData.properties, this._initData.logger,
"Ice.ACM", new ACMConfig()));
+
+ const toStringModeStr = this._initData.properties.getPropertyWithDefault("Ice.ToStringMode", "Unicode");
+ if(toStringModeStr === "ASCII")
+ {
+ _toStringMode = Ice.ToStringMode.ASCII;
+ }
+ else if(toStringModeStr === "Compat")
+ {
+ _toStringMode = Ice.ToStringMode.Compat;
+ }
+ else if(toStringModeStr !== "Unicode")
+ {
+ throw new Ice.InitializationException("The value for Ice.ToStringMode must be Unicode, ASCII or Compat");
+ }
+
this._implicitContext =
ImplicitContextI.create(this._initData.properties.getProperty("Ice.ImplicitContext"));