Apostrophe in SMS Messaage | Community
Skip to main content
Level 2
August 28, 2024
Solved

Apostrophe in SMS Messaage

  • August 28, 2024
  • 2 replies
  • 950 views

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.

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by n235ps

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

 

 

2 replies

DavidKangni
Community Advisor
Community Advisor
August 29, 2024

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 

David

David Kangni
n235psAuthor
Level 2
August 29, 2024

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.

MeitMedia
Level 4
August 30, 2024

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

 

 

n235psAuthorAccepted solution
Level 2
August 30, 2024

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