Found in "gnokii-working" directory, some November-patches version
[gnokii.git] / common / gsm-encoding.c
index b539505..7408b27 100644 (file)
   Functions for encoding SMS, calendar and other things.
 
   $Log$
-  Revision 1.1.1.1  2001/11/25 21:59:06  short
-  :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
-
-  Revision 1.4  2001/11/22 17:56:53  pkot
-  smslib update. sms sending
-
-  Revision 1.3  2001/11/17 20:15:31  pkot
-  Typo in default alphabet
+  Revision 1.1.1.2  2002/04/03 00:08:03  short
+  Found in "gnokii-working" directory, some November-patches version
 
   Revision 1.2  2001/11/08 16:34:19  pkot
   Updates to work with new libsms
@@ -32,6 +26,7 @@
 */
 
 #include <stdlib.h>
+#include <string.h>
 
 #define NUMBER_OF_7_BIT_ALPHABET_ELEMENTS 128
 
@@ -55,7 +50,7 @@ static unsigned char GSM_DefaultAlphabet[NUMBER_OF_7_BIT_ALPHABET_ELEMENTS] = {
        'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',
        'X',  'Y',  'Z',  0xc4, 0xd6, 0xd1, 0xdc, 0xa7,
        0xbf, 'a',  'b',  'c',  'd',  'e',  'f',  'g',
-       'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
+       'H',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
        'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
        'x',  'y',  'z',  0xe4, 0xf6, 0xf1, 0xfc, 0xe0
 };
@@ -155,6 +150,7 @@ int Pack7BitCharacters(int offset, unsigned char *input, unsigned char *output)
         while ((IN - input) < strlen(input)) {
 
                 unsigned char Byte = EncodeWithDefaultAlphabet(*IN);
+
                 *OUT = Byte >> (7 - Bits);
                 /* If we don't write at 0th bit of the octet, we should write
                    a second part of the previous octet */