Author |
Message
|
alethea |
Posted: Tue Oct 08, 2013 8:50 pm Post subject: |
|
|
Apprentice
Joined: 30 Jul 2007 Posts: 45
|
kimbert wrote: |
I would say 'not supplied with the data' rather than 'unknown'.
|
CCSID is not supplied with data. We want to consider 1208 irrespective of CCISD in which the msg is coming in. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 09, 2013 1:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If the CCSID is not supplied with the data, you cannot legitimately parse it correctly. You might be right 95 % of the time but then there will be the odd time or two where the content will not parse.
Setting the outbound CCSID to 1208 ( UTF-8 ) is much easier.
You will have to request from the provider that they provide the correct CCSID for the data.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
joebuckeye |
Posted: Wed Oct 09, 2013 4:53 am Post subject: |
|
|
 Partisan
Joined: 24 Aug 2007 Posts: 365 Location: Columbus, OH
|
Looks like someone needs to read this: http://www.joelonsoftware.com/articles/Unicode.html
In case you don't read it all (and you should) this is the most important part
Quote: |
If you have a string, in memory, in a file, or in an email message, you have to know what encoding it is in or you cannot interpret it or display it to users correctly. |
|
|
Back to top |
|
 |
Nitgeek |
Posted: Wed Oct 09, 2013 5:38 am Post subject: |
|
|
Novice
Joined: 21 Feb 2012 Posts: 21
|
Not sure what is there in the other posts. Could not read all.
So, I'll just post my answer.
You will have to use java. You can either use java compute node or just call teh external java method from your ESQL code.
Charset.encode is what you need.
Code: |
Charset charset = Charset.forName("UTF-8");
String s="your text";
ByteBuffer b=charset.encode(CharBuffer.wrap(s));
String encodedText = new String(b.array()); |
|
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Oct 09, 2013 5:49 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Nitgeek wrote: |
You will have to use java. |
Why? _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
dogorsy |
Posted: Wed Oct 09, 2013 5:56 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
Nitgeek wrote: |
Not sure what is there in the other posts. Could not read all.
So, I'll just post my answer.
You will have to use java. You can either use java compute node or just call teh external java method from your ESQL code.
Charset.encode is what you need.
Code: |
Charset charset = Charset.forName("UTF-8");
String s="your text";
ByteBuffer b=charset.encode(CharBuffer.wrap(s));
String encodedText = new String(b.array()); |
|
Great !!... you don't know what is going on. You could not be bother to read the whole thread, and yet you have an (wrong) opinion...  |
|
Back to top |
|
 |
kimbert |
Posted: Wed Oct 09, 2013 8:08 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
@Nitgeek: I think you are talking nonsense. Please prove me wrong. _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
|