windows phone 7 - Use what to represent apostrophe,Greater,Less Than Sign in Silverlight for SMS -
it seems run out of ideas of use represent in silveright textblock below send out sms.
for these characters
greater , less sign ----i use <
, >
apostrophe ----- use '
or '
they fine in silverlight textblock , textbox, when send them out in sms, dont work, apper in form of code &apos;
&#60
or &#62;
1)say silverlight textblock contain greater , less sign , apostrophe
2) textbox1.text = txtblk.text
smscomposetask sms = new smscomposetask(); sms.body = textbox1.text sms.show();
any1 can on this?
----update-------this code use :
1) in xaml
<textblock name="txtblkchar" textwrapping="wrap">
 <'>|||-<'><linebreak/>
</textblock>
refer   space
2) in code behind :
smscomposetask sms = new smscomposetask(); sms.body = txtblkchar.text; sms.show();
when send out sms. there chars remain same such these:
&#160;&lt;&#39;&gt;|||-&lt;&#39;&gt;
3) same result , if pass text in textblock textbox1.
txtbox1.text = txtblkchar.text
i'm not sure problem is. if use following:
var sms = new smscomposetask(); sms.body = "< ' >"; sms.show();
these characters correctly displayed in compose dialog , displayed above when received other phone.
if problem display of characters on recipient phone may encoding issue somewhere in network(s) send through.
in terms of using xaml, following works me:
xaml (any of following work me):
<textblock x:name="mybody">< ' ></textblock> <textblock x:name="mybody">< ' ></textblock> <textblock x:name="mybody">< ' ></textblock>
cs:
sms.body = mybody.text;
this displays correctly in compose dialog , in on recipient phone. i've tested in emulator , on actual device. (although didn't send emulator-obviously.)
i'm using regional/language settings "united states" (in emulator) , "united kingdom" (on device). can confirm regional/language settings using.
can confirm if not seeing things formatted correctly in compose dialog of emulator or phone or on recipient phone.
also, why encoding characters way? ones don't need (see http://msdn.microsoft.com/en-us/library/aa970677.aspx)
Comments
Post a Comment