<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: How to pack GSM-7 characters into septets</title>
	<atom:link href="http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/feed/" rel="self" type="application/rss+xml" />
	<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/</link>
	<description>A blog about Internet protocols, mobile technologies and things remotely related</description>
	<lastBuildDate>Thu, 08 Jul 2010 10:13:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Minhaj</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1627</link>
		<dc:creator>Minhaj</dc:creator>
		<pubDate>Fri, 18 Jun 2010 07:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1627</guid>
		<description>My UDH is 
05 00 03 03 02 01
for first message</description>
		<content:encoded><![CDATA[<p>My UDH is<br />
05 00 03 03 02 01<br />
for first message</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Minhaj</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1626</link>
		<dc:creator>Minhaj</dc:creator>
		<pubDate>Fri, 18 Jun 2010 07:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1626</guid>
		<description>Hello Every one ! 
Its been great to read this blog , I have an issue that I couldn&#039;t solve yet . I can not convert GSM-7 character est into septets , I need to know how this is done ?? please help me out , I need to know how this is done manually so that i could find out what am I doing wrong .

I have a text 
&quot;This is part 1.&quot;

when it is encoded without padding bits it has the following encoded hex values
54 74 7A 0E 4A CF 41 F0 B0 9C 0E 8A B9 00

but when with padding is used then it has the following hex pattern
A8 E8 F4 1C 94 9E 83 A0 61 39 1D 14 73 01


I can not convert from gsm-7 character set to gsm-7 character set with encoding , I need to know that how ths is done , I used this algorithm mentioned in this blog but it doesnt seem to be working for this , please help me out what I am missing 

Thanks in regards</description>
		<content:encoded><![CDATA[<p>Hello Every one !<br />
Its been great to read this blog , I have an issue that I couldn&#8217;t solve yet . I can not convert GSM-7 character est into septets , I need to know how this is done ?? please help me out , I need to know how this is done manually so that i could find out what am I doing wrong .</p>
<p>I have a text<br />
&#8220;This is part 1.&#8221;</p>
<p>when it is encoded without padding bits it has the following encoded hex values<br />
54 74 7A 0E 4A CF 41 F0 B0 9C 0E 8A B9 00</p>
<p>but when with padding is used then it has the following hex pattern<br />
A8 E8 F4 1C 94 9E 83 A0 61 39 1D 14 73 01</p>
<p>I can not convert from gsm-7 character set to gsm-7 character set with encoding , I need to know that how ths is done , I used this algorithm mentioned in this blog but it doesnt seem to be working for this , please help me out what I am missing </p>
<p>Thanks in regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emil E</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1622</link>
		<dc:creator>Emil E</dc:creator>
		<pubDate>Wed, 02 Jun 2010 18:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1622</guid>
		<description>Hi,
here is PDU to TXT

/*
GSM-7 packing routing.
Written by Emil.E
emil.elazar@mail.huji.ac.il
Israel
*/

int SMS_GSMDecode(unsigned char *dest, const unsigned char *source,int length)
{
       int i = 0, j=0, s=0;
       int num_ext_bits = 1;
       unsigned char ext_bits[7]={0,0,0,0,0,0,0};
       unsigned char temp=0;

       for (i = 0; i =8) num_ext_bits=1;
                ext_bits[j] =  source[s] &gt;&gt; (8-num_ext_bits);
                temp =  source[s]&lt;&gt;(num_ext_bits);
                if(j&gt;0)
                    dest[i] = (dest[i] &lt;&lt; j) &#124; ext_bits[j-1];
                               
                num_ext_bits++;
        }

        dest[i] = &#039;&#039;;
        return 1;
}

Best Regards,
Emil</description>
		<content:encoded><![CDATA[<p>Hi,<br />
here is PDU to TXT</p>
<p>/*<br />
GSM-7 packing routing.<br />
Written by Emil.E<br />
<a href="mailto:emil.elazar@mail.huji.ac.il">emil.elazar@mail.huji.ac.il</a><br />
Israel<br />
*/</p>
<p>int SMS_GSMDecode(unsigned char *dest, const unsigned char *source,int length)<br />
{<br />
       int i = 0, j=0, s=0;<br />
       int num_ext_bits = 1;<br />
       unsigned char ext_bits[7]={0,0,0,0,0,0,0};<br />
       unsigned char temp=0;</p>
<p>       for (i = 0; i =8) num_ext_bits=1;<br />
                ext_bits[j] =  source[s] &gt;&gt; (8-num_ext_bits);<br />
                temp =  source[s]&lt;&gt;(num_ext_bits);<br />
                if(j&gt;0)<br />
                    dest[i] = (dest[i] &lt;&lt; j) | ext_bits[j-1];</p>
<p>                num_ext_bits++;<br />
        }</p>
<p>        dest[i] = &#039;&#039;;<br />
        return 1;<br />
}</p>
<p>Best Regards,<br />
Emil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joker</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1603</link>
		<dc:creator>Joker</dc:creator>
		<pubDate>Fri, 12 Mar 2010 11:39:46 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1603</guid>
		<description>Very good this C function for packing with padding.
Do you also have the reverse C function?

&quot;How to UNpack septets characters into GSM-7 charset&quot;?</description>
		<content:encoded><![CDATA[<p>Very good this C function for packing with padding.<br />
Do you also have the reverse C function?</p>
<p>&#8220;How to UNpack septets characters into GSM-7 charset&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeroen</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1594</link>
		<dc:creator>Jeroen</dc:creator>
		<pubDate>Tue, 23 Feb 2010 04:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1594</guid>
		<description>If you use SMPP you don&#039;t have to pack the characters, the SMSC will do it for you. Likewise you don&#039;t have to worry about padding bits.
&lt;br&gt;
Cheers,
Jeroen</description>
		<content:encoded><![CDATA[<p>If you use SMPP you don&#8217;t have to pack the characters, the SMSC will do it for you. Likewise you don&#8217;t have to worry about padding bits.<br />
<br />
Cheers,<br />
Jeroen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1593</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Sun, 21 Feb 2010 05:56:45 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1593</guid>
		<description>Jeroen,

My complication is that I am actually trying to pack the text to be sent in an SMPP msg that will then
be sent via GSM to the handset. The length in SMPP is defined in octets.

Is this even valid?  Or should the SMSC (the receiver of the SMPP msg) be the one doing the packing?

Thanks
Tom</description>
		<content:encoded><![CDATA[<p>Jeroen,</p>
<p>My complication is that I am actually trying to pack the text to be sent in an SMPP msg that will then<br />
be sent via GSM to the handset. The length in SMPP is defined in octets.</p>
<p>Is this even valid?  Or should the SMSC (the receiver of the SMPP msg) be the one doing the packing?</p>
<p>Thanks<br />
Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeroen</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1592</link>
		<dc:creator>Jeroen</dc:creator>
		<pubDate>Sun, 21 Feb 2010 03:11:15 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1592</guid>
		<description>Tom,

In my personal experience, all modern devices look at the UDL (User Data Length; which in the case of GSM-7 is expressed in septets) to determine the size of the payload. This avoids any confusion regarding padding bits being interpreted as &#039;@&#039; and &lt;CR&gt; being ignored.

So to be short, as long as you have your UDL correct, this does not need to be handled (I know my code doesn&#039;t handle this).

It is a common bug to first encode the payload and then determine the UDL from the number of octets that the encoded payload occupies. In this case the section you quote may save you.

Jeroen</description>
		<content:encoded><![CDATA[<p>Tom,</p>
<p>In my personal experience, all modern devices look at the UDL (User Data Length; which in the case of GSM-7 is expressed in septets) to determine the size of the payload. This avoids any confusion regarding padding bits being interpreted as &#8216;@&#8217; and &lt;CR&gt; being ignored.</p>
<p>So to be short, as long as you have your UDL correct, this does not need to be handled (I know my code doesn&#8217;t handle this).</p>
<p>It is a common bug to first encode the payload and then determine the UDL from the number of octets that the encoded payload occupies. In this case the section you quote may save you.</p>
<p>Jeroen</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Esh</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1591</link>
		<dc:creator>Tom Esh</dc:creator>
		<pubDate>Sat, 20 Feb 2010 05:00:58 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1591</guid>
		<description>For GSM sms, does this need to be addressed?

http://www.3gpp.org/ftp/Specs/html-info/23038.htm
From 3GPP TS 23.038 V9.1.1 (2010-02)

If the total number of characters to be sent equals
(8n - 1) where n=1,2,3 etc. then there are 7 spare bits at the end of the message. To avoid the situation where the receiving entity confuses 7 binary zero pad bits as the @ character, the carriage return or &lt;CR;&gt; character (defined in clause 6.1.1) shall be used for padding
in this situation, just as for Cell Broadcast.

If &lt;CR&gt; is intended to be the last character and the message (including the wanted ) ends on an octet boundary, then another &lt;CR&gt; must be added together with a padding bit 0. The receiving entity will perform the carriage return function twice, but this will not result in misoperation as the definition
of &lt;CR&gt; in clause 6.1.1 is identical to the definition of &lt;CR&gt;&lt;CR&gt;.  The receiving entity shall remove the final &lt;CR&gt; character where the message ends on an octet boundary with &lt;CR&gt; as the last character.


If not, then how is this case handled in gsm sms?</description>
		<content:encoded><![CDATA[<p>For GSM sms, does this need to be addressed?</p>
<p><a href="http://www.3gpp.org/ftp/Specs/html-info/23038.htm" rel="nofollow">http://www.3gpp.org/ftp/Specs/html-info/23038.htm</a><br />
From 3GPP TS 23.038 V9.1.1 (2010-02)</p>
<p>If the total number of characters to be sent equals<br />
(8n &#8211; 1) where n=1,2,3 etc. then there are 7 spare bits at the end of the message. To avoid the situation where the receiving entity confuses 7 binary zero pad bits as the @ character, the carriage return or &lt;CR;&gt; character (defined in clause 6.1.1) shall be used for padding<br />
in this situation, just as for Cell Broadcast.</p>
<p>If &lt;CR&gt; is intended to be the last character and the message (including the wanted ) ends on an octet boundary, then another &lt;CR&gt; must be added together with a padding bit 0. The receiving entity will perform the carriage return function twice, but this will not result in misoperation as the definition<br />
of &lt;CR&gt; in clause 6.1.1 is identical to the definition of &lt;CR&gt;&lt;CR&gt;.  The receiving entity shall remove the final &lt;CR&gt; character where the message ends on an octet boundary with &lt;CR&gt; as the last character.</p>
<p>If not, then how is this case handled in gsm sms?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: boopathi</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1589</link>
		<dc:creator>boopathi</dc:creator>
		<pubDate>Thu, 18 Feb 2010 17:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1589</guid>
		<description>i need a help about UDH, in logica api am getting the length always 48. how to set octets.</description>
		<content:encoded><![CDATA[<p>i need a help about UDH, in logica api am getting the length always 48. how to set octets.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: programmer</title>
		<link>http://mobiletidings.com/2009/07/06/how-to-pack-gsm7-into-septets/comment-page-1/#comment-1583</link>
		<dc:creator>programmer</dc:creator>
		<pubDate>Sat, 06 Feb 2010 07:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://mobiletidings.com/?p=289#comment-1583</guid>
		<description>is there anyone here have vb 6 codes for pdu mode, pls help.. i need it for my thesis.</description>
		<content:encoded><![CDATA[<p>is there anyone here have vb 6 codes for pdu mode, pls help.. i need it for my thesis.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
