MMwappush wap Multimedia danish chars ÆØÅ

MMwappush wap Multimedia danish chars ÆØÅ SearchSearch
Author Message
Lars Nielsen, MobileNation ApS - Denmark
Frequent Contributor
Username: Larsmservice

Post Number: 283
Registered: 10-2003
Posted on Friday, June 13, 2008 - 10:57 pm:   

Bear in mind that i am here talking about version: 5.51m.

I am testing some mobilemarketing solutions and have run into some serious problems regarding character translations.
I POST a MMSWAPPUSH to nowsms. In the text i have danish language characters ÆØÅæøå. But nowsms seems to think that they are not those characters. I think it has something to do with that nowsms treats the POST'ed text as utf-8 and not iso-8859-1.

It is a serious problem to me. And yes i ahve tried both with and without urlencoding, and i have tried with setting headers. Nothing works.

can you please help me?

;)Lars


Here is an example from the nowsms-generated wml-page:

<small>
Hej Lars. Den her er da s&#195;&#184;d. Men de har helt bestemt stj&#195;&#165;let fra Tuborg.
</small>
It should have looked like this:
<small>
Hej Lars. Den her er da sød. Men de har helt bestemt stjålet fra Tuborg.
</small>
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7616
Registered: 10-2002
Posted on Tuesday, June 17, 2008 - 10:59 pm:   

Hi Lars,

You are submitting this text in the "MMSText" parameter, correct?

I can't be certain how it works in v5.51m ... but in current versions, I can see that the text in the "MMSText" parameter is expected to be in UTF-8 format.

The "charset" parameter can be used to specify that a different character set is being used for paramters that include text, such as "MMSText", "MMSSubject", and the regular "Text" parameter for SMS messages.

The only question is whether v5.51 supported this. I don't see any change notes about this "charset" parameter for a long time, so I suspect it did.

-bn
Lars Nielsen, MobileNation ApS - Denmark
Frequent Contributor
Username: Larsmservice

Post Number: 284
Registered: 10-2003
Posted on Tuesday, June 17, 2008 - 11:11 pm:   

Actually i am inserting the text both in MMSTEXT and TEXT. I also insert the charset=iso-8859-1 or windows-1252. i tried it all ;).


here are som logdata. I have cut out the not-important stuff:


?text=T%E6st+af+%E6%F8+og+%E5l+er+godt%2E&
charset=windows-1252&
MMWAPTemplate=gubabibob.wml&
MMSWAPPush=YES&
MMSFROM=000000&
MMSSubject=Besked+fra+000000&
MMSText=T%E6st+af+%E6%F8+og+%E5l+er+godt%2E&
MMSForwardLock=no&
MMSFile=http://bryce.com/bryce.mp4


the .WML file outputs this as the text:

T&#195;&#166;st af &#195;&#166;&#195;&#184; og &#195;&#165;l er godt.

Lars Nielsen, MobileNation ApS - Denmark
Frequent Contributor
Username: Larsmservice

Post Number: 285
Registered: 10-2003
Posted on Thursday, June 19, 2008 - 12:08 am:   

Its actually quite a huge problem for me since i cannot launch before i get these danish chars right.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7625
Registered: 10-2002
Posted on Thursday, June 26, 2008 - 08:16 pm:   

I think it's a version issue.

Sorry for taking so long to try it, but I just tried with the current version.

The national characters are garbled unless I include "&charset=windows-1252".

I'm a bit confused, however, because I went and looked at the source code for v5.51k (I'd have to go through a lot of CDs to find v5.51m as that was not considered a checkpoint release), and it is using the "charset=" parameter to convert.

Here's the WML generated in my test using the default NowSMS template:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Besked fra 000000">
<p>
<b>From:</b> (nowsms@nowsms.com)<br/>
<b>Subject:</b> Besked fra 000000
<br/>
<br/>
T&#230;st af &#230;&#248; og &#229;l er godt.
<br/>
</p>
</card>
</wml>

This actually looks quite similar to your example. If I forget the "charset=" parameter, I get this, which is obviously corrupt:

T&#27892; af &#28192;og &#23328;er godt.

But your example looks ok.

That raises a question ... NowSMS always wants to use UTF-8.

If you post from the NowSMS web interface, is it ok?

If it is, does your WML template include a character set directive, like this:

<?xml version="1.0" encoding="utf-8"?>

I suppose it is possible that your operator WAP gatweay might be ignoring this ... but that seems unlikely to me.