1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
$NetBSD: patch-ab,v 1.7 2003/07/18 13:12:21 wiz Exp $
--- src/smspdu.c.orig 2003-06-02 16:48:59.000000000 +0200
+++ src/smspdu.c
@@ -91,7 +91,7 @@ void create_smssubmit_pdu(char *pdu, cha
//leave PID and vp_relative as is
//process user data length and user data
- wide_str=convert_to_internal(nl_langinfo(CODESET),smstext,strlen(smstext));
+ wide_str=convert_to_internal("char",smstext,strlen(smstext));
if (mysmsopts.unicode) {
dcs &= 0xf3; //clear all affected bits
dcs |= 0x08; //set unicode charset
@@ -227,7 +227,7 @@ void decode_smsdeliver_pdu(unsigned char
sprintf(&oa.number[strlen(oa.number)],"%c%c",pdu[i],pdu[i+1]);
}
wide_str=sms_data_7bit_decode(oa.number,(oa.length*4)/7);
- t=convert_from_internal(nl_langinfo(CODESET),wide_str,2);
+ t=convert_from_internal("char",wide_str,2);
mem_realloc(wide_str,0);
strcpy(oa.number,t);
mem_realloc(t,0);
@@ -316,9 +316,9 @@ void decode_smsdeliver_pdu(unsigned char
//all encodings of uncompressed 7bit
wide_str=sms_data_7bit_decode(pdu+where,udl);
if ((pdutype>>6)&1){
- t=convert_from_internal(nl_langinfo(CODESET),&wide_str[1+((udh_length*8)+(udh_length*8)%7)/7],2);
+ t=convert_from_internal("char",&wide_str[1+((udh_length*8)+(udh_length*8)%7)/7],2);
} else {
- t=convert_from_internal(nl_langinfo(CODESET),wide_str,2);
+ t=convert_from_internal("char",wide_str,2);
}
mem_realloc(wide_str,0);
strcpy(ud,t);
@@ -333,7 +333,7 @@ void decode_smsdeliver_pdu(unsigned char
} else {
wide_str=convert_from_ucs2(pdu+where);
}
- t=convert_from_internal(nl_langinfo(CODESET),wide_str,2);
+ t=convert_from_internal("char",wide_str,2);
mem_realloc(wide_str,0);
strcpy(ud,t);
mem_realloc(t,0);
|