How to encoder content in chinese ?

How to encoder content in chinese ? SearchSearch
Author Message
jacee zhang
New member
Username: Jacee

Post Number: 1
Registered: 06-2006
Posted on Thursday, June 08, 2006 - 12:24 pm:   

When I send MMS-notify to mobile. Cannt be display in chiness.but the subject is Ok .
THX
Jacee.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6012
Registered: 10-2002
Posted on Friday, June 09, 2006 - 02:57 pm:   

The easiest way is to save any text files in UTF-8 encoding.
Min Lu
New member
Username: Uspepper

Post Number: 9
Registered: 08-2005
Posted on Saturday, June 24, 2006 - 12:40 am:   

Bryce,
Another problem with Chinese characters. When submit MMS to NowSMS (through MM1 or MM7), if the subject of the MMS is English, the hdr file stored in MMS-In directory shows Subject with no problem. if the subject of the MMS contains Chinese character, the hdr file will not show the subject.

Any idea?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6121
Registered: 10-2002
Posted on Tuesday, June 27, 2006 - 05:08 pm:   

Hi Min Lu,

We should be MIME encoding the subject header ...

You'd see something like this:

Subject: =?UTF-8?Q?xxxxxxxx?=

the "xxxxxxx" is encoded in quoted printable format.

That said, I do question why we do this. It would probably make more sense to just leave the date alone if it is UTF-8 encoded.

But this should explain what we are doing with this header.

-bn
Min Lu
New member
Username: Uspepper

Post Number: 10
Registered: 08-2005
Posted on Friday, June 30, 2006 - 06:48 am:   

There is no such thing as "Subject: =?UTF-8?Q?xxxxxxxx?= " even when I use a GPRS modem.
Any idea?
Attached is the received .hdr file and I am using NowSms 5.51m
application/octet-stream
449BA51B.hdr (0.5 k)
application/octet-stream
449BA512.hdr (0.5 k)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6140
Registered: 10-2002
Posted on Monday, July 03, 2006 - 02:35 pm:   

Min Lu,

Can you post a debug log showing when one of these messages is received. I'd like to see the raw message data that is coming in.

For GSM/GPRS modems, it would be in the SMSDEBUG.LOG. For other types of connections, it would be in the MMSCDEBUG.LOG.

-bn
Min Lu
New member
Username: Uspepper

Post Number: 11
Registered: 08-2005
Posted on Thursday, July 13, 2006 - 08:57 am:   

using now sms 2006).zip,application/x-zip-compressedMMS using subject in English
MMSCDEBUG(MMS with english subject (220.2 k)
application/x-zip-compressedMMS using subject in Chinese
MMSCDEBUG(MMS with Chinese subject using Now SMS 2006).zip (223.6 k)
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6197
Registered: 10-2002
Posted on Thursday, July 13, 2006 - 09:44 pm:   

Min Lu,

Thanks. I'm pretty sure I understand what's going wrong here ... at least in the MM7 case.

I've posted a NowSMS 2006 update to a temporary URL of http://www.nowsms.com/download/minlu.zip.

Give this update a try. I believe it should resolve the MM7 issue.

But I'm not sure about the MM1 issue ... unless you happen to be using MMSCOMP. If MMSCOMP encounters UTF-8 data in the HDR file without MIME encoding, then it could generate an invalid MMS header.

Let me know if this resolves your MM7 issue ... and then, if the MM1 problem is still there ... can you provide more info?

-bn
Min Lu
New member
Username: Uspepper

Post Number: 12
Registered: 08-2005
Posted on Friday, July 14, 2006 - 01:41 am:   

Any update for the old version of now sms?
Min Lu
New member
Username: Uspepper

Post Number: 13
Registered: 08-2005
Posted on Friday, July 14, 2006 - 01:56 am:   

Seemed the update works for MM7, I will test it using MM1 later. but any chance to convert "Subject: =?UTF-8?Q?xxxxxxxx?= " to real words? Or how ca I convert it without nowsms' support?
application/x-zip-compressedMMS with chinese subject after update using MM7
MMSCDEBUG after updated(now sms 2006 MM7).zip (220.3 k)
Min Lu
New member
Username: Uspepper

Post Number: 14
Registered: 08-2005
Posted on Friday, July 14, 2006 - 02:46 am:   

The trial version of Now Sms 2006 on my laptop has been expired, so I can not test it using MM1 any more.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6203
Registered: 10-2002
Posted on Friday, July 14, 2006 - 06:59 pm:   

Min Lu,

I don't know if we will update a patch for the older version with this or not. If we do, it is not likely to be real soon.

If you send an e-mail to nowsms@now.co.uk with "Attention: Bryce" in the subject line, then I'll see what I can do. If nothing else, I'll get a NowSMS 2006 extender out to you (include an installation reference code) in the e-mail.

I've been discussion this "=?UTF-8?Q?" subject line issues with one of my colleagues. And we're in agreement that it does not make sense to use this encoding when the character set is UTF-8.

Basically, what we're doing is converting the MMS header into an e-mail compatible header ... and in the e-mail world you can only be guaranteed 7-bit support within e-mail headers. Any multibyte characters in UTF-8 require multiple 8-bit bytes, at least one of which is guaranteed to be outside of the 7-bit range.

So to make such text e-mail compatible, MIME header encoding is used. In MIME header encoding, "=?" is an escape sequence that begins a block of header encoded text. This is followed by the character set name. Then another "?" followed by either "Q" (quoted printable encoding) or "B" (base64 encoding). Then another "?" ... followed by the text encoded in either Q or B format ... and terminated by "?=".

Quoted printable (Q) is pretty simple ... any characters outside the 7-bit printable range are encoded as "=xx", where "xx" is the hex code for the character.

That said, while it is clearly necessary for us to do this when converting an MMS message into e-mail format ... there does not seem to be a good reason to do this when generating the MMS-IN ".hdr" file, if we can assume that the default character set for any extended characters in the header are UTF-8. We do believe that is an acceptable assumption.

So I've updated the URL mentioned above with a minor update that stops the escaping when the character set is UTF-8. (The escaping will still be performed when routing to e-mail, but not when writing to a ".hdr" file.)

-bn

Min Lu
New member
Username: Uspepper

Post Number: 16
Registered: 08-2005
Posted on Tuesday, July 25, 2006 - 04:20 am:   

Any solution?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6263
Registered: 10-2002
Posted on Friday, July 28, 2006 - 09:09 pm:   

At this time, only for NowSMS 2006.

It's on our development to-do list to produce a v5.51 patch that includes this fix. But it is being treated as a low priority, which doesn't give it much chance of being completed until we exit summer vacation season, and return to a full engineering staff.

-bn
Min Lu
New member
Username: Uspepper

Post Number: 17
Registered: 08-2005
Posted on Wednesday, September 27, 2006 - 03:50 am:   

Anything new?
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 6589
Registered: 10-2002
Posted on Wednesday, September 27, 2006 - 09:28 pm:   

Hi Min Lu,

If you can provide me with a serial number and company information via e-mail (send it to nowsms@now.co.uk with "Attention: Bryce" in the subject line), then I will escalate this matter.

At this time, updates to v5.51 are being evaluated on a case-by-case basis for existing customers.

That said, there is an update file referenced in the following thread:

http://support.nowsms.com/discus/messages/1/16514.html

It references an update to the v5.51 MMSC.EXE, and while it is completely unrelated to the problem that you describe, I expect it would include the update that you require.

-bn