diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-06-19 21:33:06 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-06-19 21:33:06 +0200 |
| commit | 94ceb4f38ed0ba171d17076415dc912b469cd7e5 (patch) | |
| tree | 8583c7ff82123953618603301c45b3b76715c94a /src/main/java | |
| parent | da29bd904cb5d20a8b997b66de87015cef334b65 (diff) | |
Force UTF-8 for client and server CORBA communication. By default the
Sun ORB uses ISO-8859
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/com/c2kernel/process/Gateway.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/com/c2kernel/process/Gateway.java b/src/main/java/com/c2kernel/process/Gateway.java index 3f0ffe2..2499bf7 100644 --- a/src/main/java/com/c2kernel/process/Gateway.java +++ b/src/main/java/com/c2kernel/process/Gateway.java @@ -166,7 +166,8 @@ public class Gateway //TODO: externalize this (or replace corba completely)
mC2KProps.put("com.sun.CORBA.POA.ORBServerId", "1");
mC2KProps.put("com.sun.CORBA.POA.ORBPersistentServerPort", serverPort);
-
+ mC2KProps.put("com.sun.CORBA.codeset.charsets", "0x05010001, 0x00010109"); // need to force UTF-8 in the Sun ORB
+ mC2KProps.put("com.sun.CORBA.codeset.wcharsets", "0x00010109, 0x05010001");
//Standard initialisation of the ORB
mORB = org.omg.CORBA.ORB.init(new String[0], mC2KProps);
@@ -307,8 +308,12 @@ public class Gateway static public org.omg.CORBA.ORB getORB()
{
if (orbDestroyed) throw new RuntimeException("Gateway has been closed. ORB is destroyed.");
- if (mORB == null)
+
+ if (mORB == null) {
+ mC2KProps.put("com.sun.CORBA.codeset.charsets", "0x05010001, 0x00010109"); // need to force UTF-8 in the Sun ORB
+ mC2KProps.put("com.sun.CORBA.codeset.wcharsets", "0x00010109, 0x05010001");
mORB = org.omg.CORBA.ORB.init(new String[0], mC2KProps);
+ }
return mORB;
}
|
