Are there any unusable characters?

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
sohashi
Posts: 23
Joined: Thu Dec 01, 2016 1:21 pm

Are there any unusable characters?

Post by sohashi » Tue Dec 07, 2021 7:44 pm

Hi

Do you know the characters that cannot be used when sending an email using LANSA Integrator?
If you use half-width parentheses in the subject, you cannot use it.
* (→ [
Does anyone know if it's not available as a general rule or if it's a LANSA issue?

User avatar
Dino
Posts: 190
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Are there any unusable characters?

Post by Dino » Wed Dec 08, 2021 2:09 am

the parenthesis works fine in integrator if you control the concatenation like this:

Code: Select all

#u_jsmcmd := 'send subject(' + "((((" + #W_Subject + "((((" + ')'
Use Builtin(jsmx_command) With_Args(#jsmxhdle1 #u_jsmcmd) To_Get(#u_jsmsts #u_jsmmsg #message)
but if you try to send that character inputting it in the w_subject field, it gets tricky because you are using the content of w_subject as part of building an expression (the jsm command) that also contains parenthesis that need to be (carefully) open and closed.

by the way, dont forget to upgrade your fields in integrator for special characters...
viewtopic.php?f=3&t=2462&p=7129&hilit=unicode#p7129
Last edited by Dino on Fri Dec 10, 2021 11:18 am, edited 2 times in total.

sohashi
Posts: 23
Joined: Thu Dec 01, 2016 1:21 pm

Re: Are there any unusable characters?

Post by sohashi » Wed Dec 08, 2021 5:33 pm

Hi Dino

Thank you for your reply.
Although the half-width parentheses are described in the coding,
The same thing cannot be done if you send by entering half-width parentheses in the subject line.
Do you know how to avoid it?

sohashi
Posts: 23
Joined: Thu Dec 01, 2016 1:21 pm

Re: Are there any unusable characters?

Post by sohashi » Thu Dec 09, 2021 6:56 pm

Hi Dino

Thank you for your reply
The method that taught me was to specify half-width parentheses at the beginning and end of the sentence.
If there are half-width parentheses in the characters, the characters will be garbled.
Is there a way around this?

example
happy Ne)w Year→happy Ne]w Year

BrendanB
Posts: 69
Joined: Tue Nov 24, 2015 10:29 am

Re: Are there any unusable characters?

Post by BrendanB » Fri Dec 10, 2021 10:48 am

you could try the following:

Code: Select all

#u_jsmcmd := 'send subject("' + #W_Subject + '")'
Use Builtin(jsmx_command) With_Args(#jsmxhdle1 #u_jsmcmd) To_Get(#u_jsmsts #u_jsmmsg #message)
note the insertion of double-quotes AFTER the opening bracket for subject, and BEFORE the closing bracket for subject.

This *may* allow escape of whatever characters are in the #W_Subject.

User avatar
Dino
Posts: 190
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: Are there any unusable characters?

Post by Dino » Fri Dec 10, 2021 11:17 am

It works! Thank you!
itworks.jpg
itworks.jpg (104.67 KiB) Viewed 9326 times

BrendanB
Posts: 69
Joined: Tue Nov 24, 2015 10:29 am

Re: Are there any unusable characters?

Post by BrendanB » Fri Dec 10, 2021 11:28 am

Thanks for confirming Dino.

FWIW -- if you define the JSM fields as *NVARCHAR, then you will get the subject showing as 'HAPPY NE)W YEAR→HAPPY NE]W YEAR' in your email window -- the ? appears because it is a unicode character in a non-unicode field....

Code: Select all

Define Field(#jsmcmd) Type(*NVARCHAR) Length(1024)
Define Field(#jsmsts) Type(*NVARCHAR) Length(512)
Define Field(#jsmmsg) Type(*NVARCHAR) Length(512)

Post Reply