How to handle special character like Japanese in an incoming email ?

Yugi
Tera Expert

Hello all,

I recently has an issue with incoming email contain special character like Chinese or Japanese, ServiceNow does not recognize it and translate it to ���. Is there a way to fix this issue ?

find_real_file.png

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

filter out the non-ascii characters and replace them with empty string

sample script below

var data = your string value

data = data.replace(/[^\x20-\x7E]+/g, ""); // only allow ascii chars

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

I do not want them to become an empty string, because I have to map the info to incident fields (description, short desc...).

I want it become a 'readable' text, like the above text

'以上、宜しくお�い致します。'

it should be

'以上、宜しくお願い致します。'

The issue is not in ServiceNow side, you have to config the encoding part in host emails like Outlook as this URL.

However, not all host emails have this config, so I am not sure if we can do anything on ServiceNow side ?