Specifying MMS charset on MMS files created through NOW SMS gateway

Specifying MMS charset on MMS files created through NOW SMS gateway SearchSearch
Author Message
alan skinner
Unregistered guest
Posted on Thursday, January 22, 2004 - 10:43 am:   

Im sending UTF-8 encoded txt attachments via MM7 to the Now sms gateway.

But somewhere in the stage of the gateway compiling the MM7 message into an MMS message it doesnt know the txt file is encoded as UTF-8.

I can use MMSComp -cUTF8 to compile the messages properly and they work perfect.

I was wondering how I can set the content type to UTF-8 with the Now SMS gateway compiler?

Cheers

alan
I
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 1695
Registered: 10-2002
Posted on Thursday, January 22, 2004 - 07:16 pm:   

Alan,

Could you post an example of the MM7 data that you are posting?

Are you including a charset parameter in your MM7 data? Specifically, you would need to do it for each content part.

For example, the text part would have a MIME header like this:

Content-type: text/plain; charset="utf-8"; name="Quick_te.txt"
Content-location: Quick_te.txt

In my testing of this just now, I did notice a bug.

If the header is:

Content-type: text/plain; charset="utf-8"; name="Quick_te.txt"

Then it will work correctly.

If the header is:

Content-type: text/plain; name="Quick_te.txt"; charset="utf-8"

Then NowSMS is not correctly parsing utf-8 as the character set.

I'm investigating this further.

-bn



Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 1696
Registered: 10-2002
Posted on Thursday, January 22, 2004 - 07:37 pm:   

Alan,

A quick follow-up.

We have identified the problem with the MM7 parsing. We should have a fix in the next day or so. E-mail nowsms@now.co.uk if you need this update before it is posted to the web site.

Also, I noticed that I missed part of your question earlier.


quote:

I can use MMSComp -cUTF8 to compile the messages properly and they work perfect.

I was wondering how I can set the content type to UTF-8 with the Now SMS gateway compiler?




I can see that it is not really clear in the following documentation:

http://www.nowsms.com/documentation/ProductDocumentation/mms_notifications_and_c ontent/Creating_MMS_Message_Files.htm

When you generate the "X-NowMMS-Content-Location:" header, the content-type can follow the filename.

For example, you can specify the following:

X-NowMMS-Content-Location: filename.txt;text/plain;charset="utf-8"

This explicitly tells MMSCOMP the content type, and the character set.

If you do not include the content type, the NowSMS figures out the content type based upon the file extension (and the charset is read only from the command line parameter).

Note that MMSCOMP can read all of the embedded objects of a message out of the SMIL file. But if you want to explicitly set the content type and/or character set, you need to use this "X-NowMMS-Content-Location:" header.

-bn