def IsOneSMSMessage(value):
 value = escape.to_unicode(value)
 utf16_count = (len(value.encode('utf-16-be')) / 2)
 if _gsm_re.search(value):
  return (utf16_count <= MAX_GSM_CHARS)
 return (utf16_count <= MAX_UTF16_CHARS)

def IsOneSMSMessage ( value ) : value = escape . to_unicode ( value ) utf16_count = ( len ( value . encode ( 'utf-16-be' ) ) / 2 ) if _gsm_re . search ( value ) : return ( utf16_count <= MAX_GSM_CHARS ) return ( utf16_count <= MAX_UTF16_CHARS )
returns true if the value can be sent in a single sms message .