×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    18

    Invisible characters in SMS

    Hi,

    I'd like to send invisible characters via SMS but found a strange problem. The sendui does not correctly recognize string length when I insert invisible characters such as TChar(0), TChar(30), etc. Is there any way I can solve this problem?

    Here are my code; for 64, 32, 64, the length is 3 which is right (see image 64_32_64.jpg); while for 64, 30, 64, only 67 slots are left (64_30_64.jpg).

    Code:
    CMessageData* 	aMessage = CMessageData::NewLC();
    CRichText* 	aRichText = CRichText::NewL(CParaFormatLayer::NewL(), CCharFormatLayer::NewL());
    
    aRichText->InsertL( 0, (TChar)64 );
    aRichText->InsertL( 0, (TChar)32 );
    aRichText->InsertL( 0, (TChar)64 );
    //1) sendui shows 157 (=160-3) characters available to be added
    
    //aRichText->InsertL( 0, (TChar)64 );
    //aRichText->InsertL( 0, (TChar)30 );
    //aRichText->InsertL( 0, (TChar)64 );
    //2) sendui shows only 67 slots are left
    
    aMessage->SetBodyTextL( aRichText );
    
    iSendUi->CreateAndSendMessageL(KSenduiMtmSmsUid, aMessage, KNullUid );
    
    CleanupStack::PopAndDestroy(aMessage);

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Budapest, Hungary
    Posts
    28,752

    Re: Invisible characters in SMS

    It is not about incorrect size, the MTM has switched to UCS-16 encoding. In this case the message can contain 70 Unicode (16-bit) characters. And 70-3 is...
    You can check the details of the 7-bit GSM alphabet, it is not necessarily the same as 7-bit ASCII since sending control characters does not make much sense in case of SMS.

Similar Threads

  1. Distinguish between SMS
    By edcruise in forum Symbian
    Replies: 2
    Last Post: 2007-12-03, 14:34
  2. Replies: 1
    Last Post: 2005-12-01, 23:57
  3. Problem in receiving SMS of 160 characters
    By naoriya in forum General Messaging
    Replies: 3
    Last Post: 2003-12-24, 01:15
  4. Error sending SMS
    By jorge_c in forum Multimodecards
    Replies: 0
    Last Post: 2003-10-07, 11:53
  5. Strange characters at the end of the SMS
    By dheeraj_anand in forum General Messaging
    Replies: 0
    Last Post: 2002-09-24, 05:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×