Special characters in mms with attached txt-file

Special characters in mms with attached txt-file SearchSearch
Author Message
pixl
New member
Username: Pixl

Post Number: 8
Registered: 11-2003
Posted on Tuesday, November 30, 2004 - 12:25 pm:   

Hello,

I'm using your software for about a year, but now I got a new problem:
I want so send a MMS with some attachments using a http-request. I'm using a smil-file and it works quit good - the only problem is i can not see any special characters from the attached txt-file. Any help for this issue?

Thats how the smil looks like:
<smil><head><layout><region id="land" left="5" top="25" width="160" height="42" fit="meet" /><region id="logo" left="25" top="80" width="115" height="78" /><region id="text" fit="scroll" /><region id="tirka" left="30" width="120" height="210" fit="meet" /><region id="schnhoe" left="25" width="125" height="200" fit="meet" /><region id="adv" left="25" top="60" width="112" height="89" fit="meet" /></layout></head><body><par><img src="xxx.jpg" region="land" dur="5s" begin="0s" /><img src="xxx.jpg" region="logo" dur="4s" begin="1s" /></par><par><text src="1.txt" region="text" dur="6s" begin="0s" /></par><par><img src="xxx.gif" region="tirka" dur="6s" begin="0s" /></par><par><img src="xxx.jpg" region="schnhoe" dur="6s" begin="0s" /></par><par><img src="xxx.gif" region="adv" dur="2s" begin="0s" /></par></body></smil>

Regards,
Patrick
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3751
Registered: 10-2002
Posted on Wednesday, December 01, 2004 - 08:48 pm:   

Hi Patrick,

I'm assuming that you're using our proprietary URL submission technique (e.g., not MM7).

By default, we don't include a character set indicator for any text files included in the submission. Most phones default to then assuming that the character set is iso-8859-1 (but you can't even really count on that).

The solution is to encode your text file using UTF-8.

Then edit SMSGW.INI, and under the [SMSGW] header, add:

MMSCOMPParameters=-cUTF-8

When that setting is present, NowSMS will always include a header in the MMS message indicating that any included text files use the UTF-8 character set. (Note: This applies only to messages submitted through the proprietary URL submission and web interface.)

-bn
pixl
New member
Username: Pixl

Post Number: 9
Registered: 11-2003
Posted on Friday, December 03, 2004 - 09:53 am:   

Hi Bryce,

thanks for helping me so quick. I added the line, and the SMSGW.INI looks now like this:
[Modem - COM1:]
PIN=xxxx
[SMSGW]
Modem1=COM1:
WebAuth=No
WebMenu=Yes
WebPort=xxxx
SMPPPort=xxxx
ReceiveSMS=No
ReceiveMMS=No
MMSCOMPParameters=-cUTF-8
[IPRestrictions]
Allowed1=x.x.x.x
Allowed2=x.x.x.x

Is this right?

After performing that change, I restarted the gateway and tried to send another message - unfortunaly without any success:
My mobile still can not display any characters like ä, ö, ü or ß. I tested the same message with various mobiles, so it has to be a gateway problem.

Any further help?

Regards,
Patrick
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3775
Registered: 10-2002
Posted on Friday, December 03, 2004 - 05:12 pm:   

Hi Patrick,

The settings appear correct.

However, is your text file saved in UTF-8 format?

As I mentioned, we don't really analyse the content of the text file to specify the appropriate character set.

But if you save it in UTF-8 format, and have that flag set, then the text should go out correctly.

That said, I ran some tests here, and I noticed that if you save a file in UTF-8 format using Windows notepad, notepad appends some UTF-8 signature bytes to the top of the file. When that text gets sent to the phone, the phone doesn't understand the UTF-8 signature bytes, and displays a garbage character.

So if you use Notepad, and perhaps some other editors, that can be a problem.

So let me propose an easy solution to this. After all, one of the easiest ways to ensure that a text file is in UTF-8 format is to use Notepad and save it as UTF-8.

We've updated MMSCOMP (which is used by the web interface when you submit a message), so that it looks for these signature bytes, and sets the UTF-8 character set flag without requiring any SMSGW.INI file setting. It also strips off those signature bytes before sending the file to avoid problems with phones that don't like the UTF-8 signature bytes.

I think this will work better for you.

There is an update at http://www.nowsms.com/download/20041202.zip. You can either install the complete set of update files, or only MMSCOMP.EXE.

Go ahead and take that parameter back out of SMSGW.INI.

But take the text file that you are submitting, and edit it with Windows NOTEPAD. Make sure the characters appear correctly there, and save it in UTF-8 format.

-bn
pixl
New member
Username: Pixl

Post Number: 10
Registered: 11-2003
Posted on Tuesday, December 07, 2004 - 08:55 am:   

Hi Byrce,

i have installed all updates an removed the parameter from the SMSGW.INI file.

I tryed again, but it still doesn't work. I thourght there is maybe something wrong with my txt-file, so i attached it here (created with notepad):
text/plaintest text
text-uml.txt (0.0 k)


Regards,
Patrick
pixl
New member
Username: Pixl

Post Number: 11
Registered: 11-2003
Posted on Tuesday, December 21, 2004 - 12:42 pm:   

Hy Bryce,

no further help? Do you need more information?

How can I see if there are signature bytes attached?

Regards,
Patrick
Dono
Unregistered guest
Posted on Thursday, December 23, 2004 - 12:50 am:   

Try to add the following bytes in the beginning of your text file: EF BB BF
Dono
Unregistered guest
Posted on Thursday, December 23, 2004 - 12:51 am:   

The ASCII of EF BB BF are 
pixl
New member
Username: Pixl

Post Number: 12
Registered: 11-2003
Posted on Friday, December 24, 2004 - 12:34 pm:   

hy guys,

many thanks for your help :-)

i solved the problem now, two things to do:
- adding the signature bytes to the file (plain)
- adding the text (utf-8 enconded)

it works fine now, coded with java :-)

regards,
patrick