Article Unicode Characters Appearing Incorrectly in Process Studio (MJSV)

Article Unicode Characters Appearing Incorrectly in Process Studio (MJSV)

🔹 Issue Summary

A reported an issue while retrieving address data from the database and copying it into Modified JavaScript Value (MJSV) in Process Studio.

The value stored in the database:

27239 HIGHWAY 42 AРТ В

However, when used in Process Studio, it appears incorrectly due to Unicode conversion:

27239 HIGHWAY 42 APT. B

🔹 Impact

  • The Surface Automation Plugin fails to set the full value correctly
  • Only partial value is entered:
27239 HIGHWAY 42 A
  • The expected value:
27239 HIGHWAY 42 APT. B
  • This leads to data inconsistency and automation failure

🔹 Root Cause

The issue occurs due to Unicode characters (Cyrillic letters) that visually resemble ASCII characters.

Example:

CharacterLooks LikeActual Encoding
РPCyrillic
ТTCyrillic
ВBCyrillic

👉 These characters are not standard ASCII, causing:

  • Misinterpretation in MJSV
  • Incorrect behavior in Surface Automation Plugin

🔹 Solution / Workaround

This is a known issue, and a workaround is available using JavaScript.


✅ Option 1: Unicode to ASCII Converter

Use the attached script:

unicode_to_ascii_converter.txt

🔹 Function:

  • Converts Unicode characters to their ASCII equivalents

✅ Option 2: Unicode Character Handling Script

Use the attached script:

Unicode_Character_Handling.txt

🔹 This script performs:

  • Detects Unicode characters
  • Splits string into segments
  • Retains only ASCII parts
  • Counts segments
  • Outputs cleaned data in JSON format

🔹 Implementation Steps

  1. Add User Defined JavaScript / MJSV step
  2. Import or paste the provided script
  3. Pass input string from database
  4. Apply conversion logic
  5. Use cleaned output for:
    • Surface Automation Plugin
    • Further processing

🔹 Conclusion

The issue is caused by Unicode lookalike characters, not visible differences.
Using the provided JavaScript workaround ensures:

  • Correct ASCII conversion
  • Proper value handling in Process Studio
  • Successful execution of Surface Automation steps

📎 Attachments

  • unicode_to_ascii_converter.txt
  • Unicode_Character_Handling.txt

      Links to better reach 

            Bot Store

             EPD