Expand my Community achievements bar.

SOLVED

Apostrophe in SMS Messaage

Avatar

Level 2

What method can be used to escape an apostrophe in an SMS  message? I've tried two apostrophes and a few other tricks but nothing worked so far.

 

n235ps_0-1724879165038.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 2

Thank you, Meit.

 

We found the issue in the connector javascript. There were double quotes around a single quote in front of and behind the message. We changed this around to be single quotes areound a double quote and it's working fine. I appreciate the help.  Matthew

 

n235ps_0-1725042671975.png

 

View solution in original post

4 Replies

Avatar

Community Advisor

There in an option called "Authorize character transliferation". If it's supported by your SMS provider it should work. Otherwise, you will need to use unicode 

DavidKangni_0-1724933595890.png

David



David Kangni

Avatar

Level 2

Thank you, David.

We are not using SMPP, so that option is not available.

We are using a custom connector to Amazon SNS.

When using a single quote, it breaks the message at that point and thinks it reached the end (don). When using double ('') the entire message comes through (Dont forget to register!) but with no apostrophe.

Avatar

Level 5

Hi @n235ps ,

 

To handle escaping an apostrophe in an SMS message when using a custom connector to Amazon SNS in ACC, you'll need to follow a method that ensures the message is correctly transmitted without breaking at the apostrophe. Since using two apostrophes results in the apostrophe being stripped out, and you're not using SMPP, the solution requires customizing your approach.

Here’s what you can try:

  • Escape Sequence Approach: If the custom connector to Amazon SNS accepts escape sequences, try using the backslash \ to escape the apostrophe. For example, Don\'t forget to register!. This approach works in many systems that interpret backslashes as escape characters.
  • Custom Encoding: If the escape sequence approach doesn’t work, consider using a custom encoding method. You can replace the apostrophe with a URL-encoded equivalent (%27). For example, Don%27t forget to register!. This ensures the apostrophe is preserved in the message.
  • Connector Configuration: Check the configuration of the custom connector for any specific options related to character encoding or escaping special characters. Some connectors may have settings that allow for specific handling of characters like apostrophes.
  • Message Template Adjustment: As a workaround, you could slightly modify the wording in your message template to avoid using an apostrophe. For instance, instead of "Don't forget to register!", you could use "Do not forget to register!" while you troubleshoot the issue further.

By trying these methods, you should be able to properly handle apostrophes in your SMS messages without breaking the message content.

 

Best regards,

MEIT MEDIA (https://www.meitmedia.com)

Find us on LinkedIn

Contact Us: infomeitmedia@gmail.com

MeitMedia_0-1725038049191.png

 

 

Avatar

Correct answer by
Level 2

Thank you, Meit.

 

We found the issue in the connector javascript. There were double quotes around a single quote in front of and behind the message. We changed this around to be single quotes areound a double quote and it's working fine. I appreciate the help.  Matthew

 

n235ps_0-1725042671975.png