Non Latin Accented Letters Not Displayed in Notification Email
search cancel

Non Latin Accented Letters Not Displayed in Notification Email

book

Article ID: 274980

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

Emails that are sent after retry lose the Unicode encoding that originally had (Serbian Latin encoding)

For example, the letter č was replaced with a ? in the notification email

Environment

Release : 17.3 RU17-RU23 and 17.4 GA

Cause

It may be thought that the provided pdm_mail_assembly.jar file causes this issue, but this is how the email processing works:

Whenever mail is sent from notify process of SDM(bpnotify_nxd), the mail is sent to the pdm_mail_nxd for processing.

If there is no SocketException thrown by Mail Server, the message/mail is sent as is to the mail server

If the mail server throws a socket exception in middle of mail processing, 

WITHOUT THE FIX in place, a copy of the mail is written to mail_undeliverable folder.

WITH THE FIX in place, a copy of the mail is NOW written to mail_queue folder for next retry.

If we open the email copy present in the respective folders, we would see the encoding is corrupted as we do String Operations to create a copy.

This is due to the Serbian Latin Characters which are not handled properly ever.

In a successful case, mail is sent as is.

But in case of failures, we do String operations and create a copy for further processing.

Resolution

To have the characters displayed correctly:

Navigate to $NXROOT\pdmconf and open the file pdm_startup.i file.

Search for  PdmMailNxdStartupService.

There will be 2 entries:

Modify the 1st entry from:

command = "$NX_JRE_INSTALL_DIR/bin/java -XX:+UseG1GC -Djava.net.preferIPv4Stack=false -DAPP_NAME=mail_nxd com.ca.ServicePlus.mailer.PdmMailNxdStartupService"

to

command = "$NX_JRE_INSTALL_DIR/bin/java -XX:+UseG1GC -Djava.net.preferIPv4Stack=false -Dfile.encoding=UTF-8 -DAPP_NAME=mail_nxd com.ca.ServicePlus.mailer.PdmMailNxdStartupService"
 

Modify the 2nd entry from

command = "$NX_JRE_INSTALL_DIR/bin/java -XX:+UseG1GC -Djava.net.preferIPv4Stack=false -DAPP_NAME=mail_nxd com.ca.ServicePlus.mailer.PdmMailNxdStartupService -p"

to

command = "$NX_JRE_INSTALL_DIR/bin/java -XX:+UseG1GC -Djava.net.preferIPv4Stack=false -Dfile.encoding=UTF-8 -DAPP_NAME=mail_nxd com.ca.ServicePlus.mailer.PdmMailNxdStartupService -p"

Do the same changes to pdm_startup.i.tpl so that pdm_configure operation doesn't override these changes

Restart the CA Service Desk Manager Services

The copy of mail we create in mail_queue folder will utilize UTF-8 encoding and therefore not cause encoding issues.

 

Additional Information

The updated pdm_startup.i.tpl is available as of 17.4RU1.  As 17.3 is EOS, the above will remain unaddressed at this release.