ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » URDU Language convertion to Hex characters.

Post new topic  Reply to topic
 URDU Language convertion to Hex characters. « View previous topic :: View next topic » 
Author Message
mzm.shan
PostPosted: Wed Mar 11, 2015 11:51 pm    Post subject: URDU Language convertion to Hex characters. Reply with quote

Apprentice

Joined: 25 Aug 2013
Posts: 39

Hello everyone,

I am tring to convert URDU character convertion to Hex using the following statemnt in esql

SET ref.UrduTemplate = 'ٹ';
DECLARE UrduTempleteBLOB1 BLOB CAST(ref.UrduTemplate as BLOB CCSID 868) ;

the CCSID 868 i saw on the following link for my relevant language.
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.dev.doc/q104460_.htm

Interesting part is the ERROR below showing a converted HEX which is 7606 while the correct HEX should be 0676.........

Please help what should i do to get the correct equalent 0676 hex agianst this letter and resolve this error......????


Text:CHARACTER:DECLARE UrduTempleteBLOB1 BLOB CAST(ref.UrduTemplate AS BLOB CCSID 868);
RecoverableException
File:CHARACTER:F:\build\slot1\S900_P\src\DataFlowEngine\ImbRdl\ImbRdlTypeCast.cpp
Line:INTEGER:268
Function:CHARACTER:SqlTypeCast::evaluate
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2521
Text:CHARACTER:Error while casting
Insert
Type:INTEGER:5
Text:CHARACTER:.FileInputWithDFDL_Compute1.Main
Insert
Type:INTEGER:5
Text:CHARACTER:19.34
Insert
Type:INTEGER:5
Text:CHARACTER:'ٹ'
Insert
Type:INTEGER:5
Text:CHARACTER:BLOB
RecoverableException
File:CHARACTER:F:\build\slot1\S900_P\src\CommonServices\ImbConverter.cpp
Line:INTEGER:372
Function:CHARACTER:ImbConverterCPP::internalFromUnicode
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2136
Text:CHARACTER:Unconvertable character
Insert
Type:INTEGER:5
Text:CHARACTER:7906
Insert
Type:INTEGER:5
Text:CHARACTER:7906
Insert
Type:INTEGER:2
Text:CHARACTER:868
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 12, 2015 4:30 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

May be you have the wrong endian-order specified?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Thu Mar 12, 2015 4:36 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The character that you are trying to encode is GCGID AT030009.
In Unicode this character is U0000679 ARABIC LETTER TTEH
...as shown here :http://www-01.ibm.com/software/globalization/gcgid/arabic.html

You are trying to write AT030009 ( or U0000679 ) using CCSID 868.
http://www-01.ibm.com/software/globalization/ccsid/ccsid868.html

The characters in CCSID 868 are listed here:
ftp://ftp.software.ibm.com/software/globalization/gcoc/attachments/CS01248.txt
...and AT030009 is not one of them.

Summary: CCSID 868 does not contain the character that you are trying to write. You will need to select a different CCSID. Any good reason why you are not using CCSID 1208 ( UTF-8 )? Or CCSID 1200 ( UTF-16 )?
_________________
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
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 12, 2015 5:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Also, if you are trying to write the character "in Hex", then you might try removing the CCSID entirely. That will (or, maybe, should) produce a hexadecimal representation of the bytes of the character value.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 12, 2015 5:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
you might try removing the CCSID entirely. That will (or, maybe, should) produce a hexadecimal representation of the bytes of the character value.
Possibly. It depends on
a) what the OP means by 'in Hex' and
b) what you mean by 'the bytes of the character value'
Personally, I would prefer to be explicit about the CCSID so that I know exactly what to expect.
_________________
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
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 12, 2015 5:25 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert wrote:
Quote:
you might try removing the CCSID entirely. That will (or, maybe, should) produce a hexadecimal representation of the bytes of the character value.
Possibly. It depends on
a) what the OP means by 'in Hex' and

Yes, that was part of my point...
kimbert wrote:
b) what you mean by 'the bytes of the character value'

I meant, for example that in ASCII, the letter a is binhexed to '61'. So the 'character value' is 'a', and the bytes that represent it are displayed in bin->hex as '61'.
kimbert wrote:
Personally, I would prefer to be explicit about the CCSID so that I know exactly what to expect.

Sure, if one is trying to convert between codepages. If one is merely trying to create a character representation of byte values, one might not.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Mar 12, 2015 5:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I meant, for example that in ASCII, the letter a is binhexed to '61'
Exactly. But the characters in the message tree are Unicode ( UTF-16, platform endian), not ASCII. The default CAST-to-BLOB behavior will probably produce either UTF-16BE or UTF-16LE depending on the endian-ness of the platform.
_________________
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
View user's profile Send private message
mqjeff
PostPosted: Thu Mar 12, 2015 5:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kimbert wrote:
The default CAST-to-BLOB behavior will probably produce either UTF-16BE or UTF-16LE depending on the endian-ness of the platform.

Oh, right, I was thinking of the default BLOB->Char casting behavior.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » URDU Language convertion to Hex characters.
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.