Hi I read on AWS SNS documentation that SMS messages sent using GSM-7 encoding can have 160 characters or 140 on ASCII or 70 on UC-2. The SNS will select the best encoding for the message. I'm using the following code to send SMS messages and it always selects the UC-2 encoding breaking my messages in two or more parts. There is a way to force SNS use ASCII or GSM encoding ?
svc := sns.New(newSession())
if _, err = svc.Publish(&sns.PublishInput{
Message: aws.String(content),
PhoneNumber: aws.String(number),
MessageAttributes: map[string]*sns.MessageAttributeValue{
"DefaultSMSType": {
DataType: aws.String("String"),
StringValue: aws.String("Transactional")},
},
}); err != nil {
log.Println(err.Error())
return
}