×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    Singapore
    Posts
    20

    Encoding UTF8 in MMS-Subject

    Hi,

    Any idea how to encode UTF8 on a MMS-Subject ?.

    Specs= Value-Length Charset Text String

    0x96 - Subject
    0x20 - Length of subject
    0x02 - Length Charset
    0x81 - Charset
    0xEA - UTF-8
    ............ UTF-8 encoded content
    0x00 - end of encoding


    I got no problem encoding a content type text to UTF8 but just couldn't work for the subject. Help ....... thanks.

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Singapore
    Posts
    20
    OK. I found the answer somewhere in the forum.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    10

    where can I find the answer?

    Where can I find how to encode the subject using the mms library?

  4. #4
    Registered User
    Join Date
    Dec 2004
    Posts
    10

    upgraded to 1.5 I do see it in the API but...

    Hi

    I have upgraded my sdk to 1.5 I do see in the API that I can send MMS with utf-8 encoding; However the following two commands had different format of the received subject:

    toBeSendMsg.setSubject("\u00f1\u00f1\u00f1\u00f1", "UTF-8");
    Result :
    Subject: =?utf-8?Q?=C3=B1=C3=B1=C3=B1=C3=B1?=

    toBeSendMsg.setSubject("some spanish characters", "UTF-8"); // I actually have there some spanish characters just couldnt copy them to here...
    Result:
    Subject: [here there was no =?utf-8... at the beggining]

    Why wasnt there any =?utf-8... ? in my second send? How will mobile phones know that they should decode the subject in UTF-8 if the subject header didnt specify this?

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    10

    looks like problem solved

    Cant put directly spanish characters in java code, getting them from an outer source like a stream and the subject is encoded correctly with UTF-8 (so far tested only with emulator but things look fine...)

Posting Permissions

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