taximania Well-Known Member Licensed User Longtime User Jan 5, 2011 #1 In my MsgLib code I have this snippet. Below. Everything I've found on google says it should work. Every convert type, UTF8, ASCII etc doesn't work. Basic4ppc throws the error. Code: Method not found. GetString System.Text.Encoding. Continue? Code: public string GetMsgBody(int Num) { byte[] b = Convert.FromBase64String(msg[Num].Body); string str = System.Text.Encoding.UTF8.GetString(b); return str; } I know WinMo 5 and 6 devices handle different message.body 's differently. ASCII, HTML, MIME etc But surely there's a way to convert either type to ASCII. That way I could parse the string using Basic4ppc functions.
In my MsgLib code I have this snippet. Below. Everything I've found on google says it should work. Every convert type, UTF8, ASCII etc doesn't work. Basic4ppc throws the error. Code: Method not found. GetString System.Text.Encoding. Continue? Code: public string GetMsgBody(int Num) { byte[] b = Convert.FromBase64String(msg[Num].Body); string str = System.Text.Encoding.UTF8.GetString(b); return str; } I know WinMo 5 and 6 devices handle different message.body 's differently. ASCII, HTML, MIME etc But surely there's a way to convert either type to ASCII. That way I could parse the string using Basic4ppc functions.
agraham Expert Licensed User Longtime User Jan 5, 2011 #2 I'm surprised that compiles. According to my VS2005 documentation Encoding.GetString Method (Byte[]) is not supported on the Compact Framework. However the Encoding.GetString Method (Byte[], Int32, Int32) variant is supposed to be supported.
I'm surprised that compiles. According to my VS2005 documentation Encoding.GetString Method (Byte[]) is not supported on the Compact Framework. However the Encoding.GetString Method (Byte[], Int32, Int32) variant is supposed to be supported.
taximania Well-Known Member Licensed User Longtime User Jan 6, 2011 #3 Cheers for that Agraham. Nice pointer Still don't work :sign0148: Leave it for now it now mate. 'Till I ask another question :sign0137: Every msg.body has it's own properties. And needs to be converted accordingly. I'll get there. I usually do ;-)
Cheers for that Agraham. Nice pointer Still don't work :sign0148: Leave it for now it now mate. 'Till I ask another question :sign0137: Every msg.body has it's own properties. And needs to be converted accordingly. I'll get there. I usually do ;-)