Author |
Message
|
DanielSonFocus |
Posted: Tue Sep 12, 2006 11:18 am Post subject: Special Characters in ESQL |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
Hi, i have 2 questions:
1) I'm trying to put a copyright symbol into a charater string in ESQL like so:
DECLARE CHAR COPYRIGHT '©';
I don't get an error at compile time but at run-time this throws an error when i look at my user trace output. What is the proper way to do this?
2) Do i need to escape back slashes or forward slashes when assigning values to character strings in ESQL? If so what is the escape character? Once again this does not cause an error during compile-time but im afraid it will during run-time. |
|
Back to top |
|
 |
DanielSonFocus |
Posted: Tue Sep 12, 2006 11:54 am Post subject: |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
Here is the UserTrace for the error i am seeing...
Code: |
2006-09-12 15:47:25.033918 4084 UserTrace BIP2231E: Error detected whilst processing a message 'com.xyz.common.Flow'.
The message broker detected an error whilst processing a message in node 'com.xyz.common.Flow'. The message has been augmented with an exception list and has been propagated to the node's failure terminal for further processing.
See the following messages for details of the error.
2006-09-12 15:47:25.034070 4084 RecoverableException BIP2488E: (com.xyz.common.Flow_Compute1.Main, 10.3) Error detected whilst executing the SQL statement 'IF InputRoot.XML.Message.MailHost IS NOT NULL AND LENGTH(InputRoot.XML.Message.MailHost) > 0 THEN... END IF;'.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2006-09-12 15:47:25.034263 4084 ParserException BIP5009E: XML Parsing Errors have occurred.
Errors have occurred during parsing of XML.
Review further error messages for an indication to the cause of the errors.
2006-09-12 15:47:25.034320 4084 ParserException BIP5004E: XML parsing error (Invalid character (Unicode: 0x1A)) encountered on line 6 column 30 while parsing element Body.
The above error was reported by the generic XML parser.
This message is usually caused by a badly-formed XML message. Check that the XML message being passed in is a well-formed XML message that adheres to the XML specification. Note that the line number and column number quoted above give the position where the parser discovered the problem. The actual error may be earlier in the message. Internal error codes : (192), (). |
I basically set that copyright symbol in one flow and pass it onto another flow to do some more message transformation. The second flow throws the above error when the copyright symbol is in the message. When it is not, i get no errors. |
|
Back to top |
|
 |
msukup |
Posted: Tue Sep 12, 2006 12:28 pm Post subject: |
|
|
Acolyte
Joined: 11 Feb 2002 Posts: 56
|
Perhaps if you set the hex value for copyright symbol in BLOB variable instead and use a CAST with CCSID option set to write variable to bitstream? |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 12, 2006 12:48 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Perhaps if we saw how the ESQL variable was used in the message stream... _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Sep 13, 2006 12:58 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
ParserException BIP5004E: XML parsing error (Invalid character (Unicode: 0x1A)) encountered on line 6 column 30 while parsing element Body.
The above error was reported by the generic XML parser. |
This has very little to do with ESQL. You are passing a badly-formed document to the XML parser. The parsing just happens to occur when
Code: |
IF InputRoot.XML.Message.MailHost IS NOT NULL AND LENGTH(InputRoot.XML.Message.MailHost) > 0 THEN... END IF;' |
is being executed. |
|
Back to top |
|
 |
Vijji |
Posted: Wed Sep 13, 2006 6:06 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Can we declare variable Like DECLARE CHAR COPYRIGHT '©';?  |
|
Back to top |
|
 |
DanielSonFocus |
Posted: Wed Sep 13, 2006 7:00 am Post subject: |
|
|
 Apprentice
Joined: 05 Jun 2005 Posts: 35 Location: Louisville, Kentucky
|
I found the culprit... I was copying and pasting some error text from Microsoft Word directly into my ESQL and one of the error messages had the word "you're" in it. The weird thing is that when i copied the message over it copied over as the French accent acute (e.g. ’ ) and not as an apostrophe (e.g. ').
This also happened to be the same line that had the CopyRight symbol in it so i would comment out the entire line and it would work. Bonehead move i guess.
Thanks for your help everyone. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Sep 13, 2006 7:46 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Bonehead move i guess |
Not really. The copy/paste behaviour was unexpected. But you could have saved yourself a few hours by reading the error message more carefully - it told you exactly what the problem was. |
|
Back to top |
|
 |
|