Page 1 of 1

Are there any unusable characters?

Posted: Tue Dec 07, 2021 7:44 pm
by sohashi
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?

Re: Are there any unusable characters?

Posted: Wed Dec 08, 2021 2:09 am
by Dino
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

Re: Are there any unusable characters?

Posted: Wed Dec 08, 2021 5:33 pm
by sohashi
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?

Re: Are there any unusable characters?

Posted: Thu Dec 09, 2021 6:56 pm
by sohashi
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

Re: Are there any unusable characters?

Posted: Fri Dec 10, 2021 10:48 am
by BrendanB
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.

Re: Are there any unusable characters?

Posted: Fri Dec 10, 2021 11:17 am
by Dino
It works! Thank you!
itworks.jpg
itworks.jpg (104.67 KiB) Viewed 19990 times

Re: Are there any unusable characters?

Posted: Fri Dec 10, 2021 11:28 am
by BrendanB
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)