Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x f5ddae708 -> f129e2990
  refs/heads/camel-2.14.x b7723c089 -> 38e4ded5a


CAMEL-7224 Fixed the camel-smpp fails to correctly send messages that require 
UCS-2 encoding with thanks to Daniel


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/38e4ded5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/38e4ded5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/38e4ded5

Branch: refs/heads/camel-2.14.x
Commit: 38e4ded5aa876a3bad8290d37076abe5dcbcecff
Parents: b7723c0
Author: Willem Jiang <willem.ji...@gmail.com>
Authored: Fri Nov 7 10:20:25 2014 +0800
Committer: Willem Jiang <willem.ji...@gmail.com>
Committed: Fri Nov 7 11:07:49 2014 +0800

----------------------------------------------------------------------
 .../java/org/apache/camel/component/smpp/SmppSmCommand.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/38e4ded5/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSmCommand.java
----------------------------------------------------------------------
diff --git 
a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSmCommand.java
 
b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSmCommand.java
index 522ffad..175ac9c 100644
--- 
a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSmCommand.java
+++ 
b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppSmCommand.java
@@ -85,8 +85,10 @@ public abstract class SmppSmCommand extends 
AbstractSmppCommand {
     }
 
     private Charset determineCharset(byte providedAlphabet, byte 
determinedAlphabet) {
-        if (providedAlphabet == SmppConstants.UNKNOWN_ALPHABET && 
determinedAlphabet == Alphabet.ALPHA_UCS2.value()) {
-            return Charset.forName(SmppConstants.UCS2_ENCODING); // change 
charset to use multilang messages
+        if (providedAlphabet == Alphabet.ALPHA_UCS2.value() 
+            || (providedAlphabet == SmppConstants.UNKNOWN_ALPHABET && 
determinedAlphabet == Alphabet.ALPHA_UCS2.value())) {
+            // change charset to use multilang messages
+            return Charset.forName(SmppConstants.UCS2_ENCODING); 
         }
         
         return charset;
@@ -110,4 +112,4 @@ public abstract class SmppSmCommand extends 
AbstractSmppCommand {
 
         return alphabetObj;
     }
-}
\ No newline at end of file
+}

Reply via email to