summaryrefslogtreecommitdiffabout
path: root/gammu
Unidiff
Diffstat (limited to 'gammu') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmmisc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gammu/emb/common/service/gsmmisc.c b/gammu/emb/common/service/gsmmisc.c
index 1c6ec8b..486d136 100644
--- a/gammu/emb/common/service/gsmmisc.c
+++ b/gammu/emb/common/service/gsmmisc.c
@@ -212,25 +212,28 @@ void SaveVCALText(char *Buffer, int *Length, char *Text, char *Start)
212} 212}
213 213
214bool ReadVCALText(char *Buffer, char *Start, char *Value) 214bool ReadVCALText(char *Buffer, char *Start, char *Value)
215{ 215{
216 unsigned char buff[200]; 216 unsigned char buff[200];
217 217
218 Value[0] = 0x00; 218 Value[0] = 0x00;
219 Value[1] = 0x00; 219 Value[1] = 0x00;
220 220
221 strcpy(buff,Start); 221 strcpy(buff,Start);
222 strcat(buff,":"); 222 strcat(buff,":");
223 if (!strncmp(Buffer,buff,strlen(buff))) { 223 if (!strncmp(Buffer,buff,strlen(buff))) {
224 EncodeUnicode(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1)); 224
225 // LR original :EncodeUnicode(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1));
226 // LR we have utf8 as default
227 DecodeUTF8(Value,Buffer+strlen(Start)+1,strlen(Buffer)-(strlen(Start)+1));
225 dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); 228 dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value));
226 return true; 229 return true;
227 } 230 }
228 /* SE T68i */ 231 /* SE T68i */
229 strcpy(buff,Start); 232 strcpy(buff,Start);
230 strcat(buff,";ENCODING=QUOTED-PRINTABLE:"); 233 strcat(buff,";ENCODING=QUOTED-PRINTABLE:");
231 if (!strncmp(Buffer,buff,strlen(buff))) { 234 if (!strncmp(Buffer,buff,strlen(buff))) {
232 DecodeUTF8QuotedPrintable(Value,Buffer+strlen(Start)+27,strlen(Buffer)-(strlen(Start)+27)); 235 DecodeUTF8QuotedPrintable(Value,Buffer+strlen(Start)+27,strlen(Buffer)-(strlen(Start)+27));
233 dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value)); 236 dbgprintf("ReadVCalText is \"%s\"\n",DecodeUnicodeConsole(Value));
234 return true; 237 return true;
235 } 238 }
236 strcpy(buff,Start); 239 strcpy(buff,Start);