Amazingly to me you are absolutely right... This has been puzzling me for many months and the solution was right there.
Simple things are the best. What happens if we would like to send Unicode messages. I have been trying to send Unicode but with no luck. I am using again xml post and I am sending for α β γ %03%B1%00%20%03%B2%00%20%03%B3 coded as Unicode and setting coding=2 (UCS2) I have tried many different combinations but either kannel will not send at alla and some other times I will receive an empty message. In my logs I see the following 2007-08-07 01:53:46 [6586] [3] ERROR: Failed to convert string from <UTF-8> to <UTF-16BE>, errno was <84> (is there a list with all error codes and their meaning) Finally, if I want to set charset to xml post, how do I do it I have tried <charset>utf-8</charset>, is that correct? Thanx everyone for your help Best regards Dinos -----Original Message----- From: Alexander Malysh [mailto:[EMAIL PROTECTED] Sent: Friday, August 03, 2007 4:32 PM To: [email protected] Subject: RE: CANT SEND GREEK CHARACTERS Hi, I wonder why you need patching kannel if you use CVS? Kannel CVS version uses UTF-8 as default charset. And if you need to send greek chars you just should either use UTF-8 or define charset cgi variable in your request. e.g. to send ? (Delta) you do: lynx 'http://ip:port?...&text=%e2%88%86&...' ???????????? ???????? wrote: > Thanks again Thanos, really appreciate your help... > > Since I am using cvs and you sendme charset.c ftom your 1.4.1 version , I > found that they are a bit different. So what i did the following: > Download again latest cvs > Copied and pasted (with webmin) the new charset.c over the one I had > initially made changes Then using webmin again I opened both files, and > copied and pasted between them ( I think webmin is doesn?t change line > endings) > > By issuing the diff command I got this > > [EMAIL PROTECTED] ~]# diff -u /usr/src/kannel/gateway/gwlib/charset.c > [/usr/src/gat > [ eway/gwlib/charset.c > --- /usr/src/kannel/gateway/gwlib/charset.c 2007-05-18 > 15:08:29.000000000 +0 > 300 > +++ /usr/src/gateway/gwlib/charset.c 2007-08-03 12:52:01.000000000 > +0300 @@ -126,14 +126,14 @@ > * though normally the function that indexes into this table will > * treat it specially. */ > static const unsigned char gsm_to_latin1[128] = { > - '@', 0xa3, '$', 0xa5, 0xe8, 0xe9, 0xf9, 0xec, /* 0 - 7 */ > - 0xf2, 0xc7, 10, 0xd8, 0xf8, 13, 0xc5, 0xe5, /* 8 - 15 */ > - '?', '_', '?', '?', '?', '?', '?', '?', /* 16 - 23 */ > - '?', '?', '?', ' ', 0xc6, 0xe6, 0xdf, 0xc9, /* 24 - 31 */ > - ' ', '!', '"', '#', 0xa4, '%', '&', '\'', /* 32 - 39 */ > - '(', ')', '*', '+', ',', '-', '.', '/', /* 40 - 47 */ > - '0', '1', '2', '3', '4', '5', '6', '7', /* 48 - 55 */ > - '8', '9', ':', ';', '<', '=', '>', '?', /* 56 - 63 */ > + '@', 0xa3, '$', 0xa5, 0xe8, 0xe9, 0xf9, 0xec, /* 0 - 7 */ > + 0xf2, 0xc7, 10, 0xd8, 0xf8, 13, 0xc5, 0xe5, /* 8 - 15 */ > + 0x10, '_', 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* 16 - 23 */ > + 0x18, 0x19, 0x1a, ' ', 0xc6, 0xe6, 0xdf, 0xc9, /* 24 - 31 */ > + ' ', '!', '"', '#', 0xa4, '%', '&', '\'', /* 32 - 39 */ > + '(', ')', '*', '+', ',', '-', '.', '/', /* 40 - 47 */ > + '0', '1', '2', '3', '4', '5', '6', '7', /* 48 - 55 */ > + '8', '9', ':', ';', '<', '=', '>', '?', /* 56 - 63 */ > 0xa1, 'A', 'B', 'C', 'D', 'E', 'F', 'G', /* 64 - 71 */ > 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', /* 73 - 79 */ > 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', /* 80 - 87 */ > > Then I did > Make clean > Make > Make install > > But then again, problem still remains.... > > I am not a linux expert, but I believe it should have worked, shouldn?t > it? Do you think I should go for 1.4.1 and not cvs version? You think this > maybe solve my problem > > Many thanx > > Dinos > > > > -----Original Message----- > From: Thanos Chatziathanassiou [mailto:[EMAIL PROTECTED] > Sent: Friday, August 03, 2007 3:22 PM > To: ???????????? ???????? > Subject: Re: CANT SEND GREEK CHARACTERS > > ???????????? ???????? wrote: >> Thank you very much Thanos for your prompt reply, >> >> Unfortunatelly I don?t know how to correct the line endings, hence I >> tried to substitute the 2 lines from the patch manually and recompile >> kannel. So I did it numerous times manually. If I open >> gateway/gwlib/charset.c I see the file includes the greek characters. >> After I do: make clean Make >> Make install >> There are no errors or something that tells me that there was a >> problem while compiling >> >> But as soon as I start kannel the problem remains, and greek cannot be >> send in 7bit encoding. >> >> Correct me if I am wrong anywhere in the way... >> > Maybe you're patching the wrong function ? > all this goes into (actually below) > ``static const unsigned char gsm_to_latin1[128] = {'' > in fact, i'm sending you mine, from 1.4.1 tree. > you can do a ``diff -u old_charset.c charset.c'' to show where things went > under. > > I'm sending a gziped version as well, just in case the line endings get > messed up again. > >> Any more ideas >> >> Thanx >> >> >> >> >> -----Original Message----- >> From: Thanos Chatziathanassiou [mailto:[EMAIL PROTECTED] >> Sent: Friday, August 03, 2007 2:11 PM >> To: ???????????? ???????? >> Cc: [email protected] >> Subject: Re: CANT SEND GREEK CHARACTERS >> >> ???????????? ???????? wrote: >> >>> The only way I could apply patch was to do it manually with >>> copy/paste at gateway/gwlib/charset.c and changing the lines in that >>> with the ones from the patch >>> >>> I did make and make install started kannel again, but I am still facing >>> the same problem. Am I correct?, is there another way? >>> >>> >> I suspect someone's been overly zealous with line endings.... >> ?? ??????? ?? ??????? ??? ????????? ?? patch ?? windows ?/??? >> ????????? ?? patch ???? samba ??? unix?????? ???; ????? ???? ?????? >> ???????? ?? line endings ???????????? ??? LF (0x0a) ?? CR/LF (0x0d >> 0x0a), ???? ??? ??? ???????????? patch ??? ??? ?????? ???????. >> M?????? ???? ?? ??????????????? ??? ?????? ?????? (????????????? ?? >> comments ??? ?????) ? ?????? ?? ?????????? ?? CR/LF. >> ?????? ?? ``make clean; make'' ???? ????? ??????????? ???, ???? ``rm >> gwlib/charset.o; make'' ?????? ?? ??????. >> >> >>> Thanks >>> Dinos >>> >>> -----Original Message----- >>> From: ???????????? ???????? [mailto:[EMAIL PROTECTED] >>> Sent: Friday, August 03, 2007 1:26 PM >>> To: 'Thanos Chatziathanassiou' >>> Cc: [email protected] >>> Subject: RE: CANT SEND GREEK CHARACTERS >>> >>> Tried to patch charset.c placed in /gateway/gwlib but with no luck >>> >>> This is what I got >>> >>> [EMAIL PROTECTED] gwlib]# patch -p0 < /usr/src/gateway/charset.c.patch >>> (Stripping trailing CRs from patch.) patching file charset.c Hunk #1 >>> FAILED at 76. >>> 1 out of 1 hunk FAILED -- saving rejects to file charset.c.rej >>> [EMAIL PROTECTED] gwlib]# patch -p0 < /usr/src/gateway/charset.c.patch >>> (Stripping trailing CRs from patch.) patching file charset.c Hunk #1 >>> FAILED at 76. >>> 1 out of 1 hunk FAILED -- saving rejects to file charset.c.rej >>> >>> Any ideas? >>> >>> Thanks in advance >>> >>> Dinos >>> >>> -----Original Message----- >>> From: Thanos Chatziathanassiou [mailto:[EMAIL PROTECTED] >>> Sent: Friday, August 03, 2007 12:46 PM >>> To: ???????????? ???????? >>> Subject: Re: CANT SEND GREEK CHARACTERS >>> >>> ???????????? ???????? wrote: >>> >>> >>>> Thank you very much for your repley Thanos, >>>> >>>> I found the thread but I don?t seem to be able to find the patch. >>>> >>>> Could you send it to me please? >>>> >>>> >>>> >>> There you go (works against 1.4.0 & 1.4.1) ... >>> since the list already has it (I've found it in my archives) and it's >>> not of any considerable quality, I'm not sending it again to the list. >>> >>> ??????: ?? ??????? ????? ?? bulk-sms.gr ? >>> >>> >>> >>>> Thank you very much in advance >>>> >>>> Regards >>>> >>>> Dinos >>>> >>>> >>>> -----Original Message----- >>>> From: Thanos Chatziathanassiou [mailto:[EMAIL PROTECTED] >>>> Sent: Friday, August 03, 2007 12:32 PM >>>> To: ???????????? ???????? >>>> Cc: '???????? ?????????????' >>>> Subject: Re: CANT SEND GREEK CHARACTERS >>>> >>>> ???????????? ???????? wrote: >>>> >>>> >>>> >>>>> Hello again and thanks for your patience. >>>>> >>>>> I am doing the conversion like you suggested. If I use coding = 0 >>>>> which is 7bit I greek characters like ? appear like ? on my mobile >>>>> device >>>>> >>>>> If I set coding = 1 which is 8bit then Greeks appear ok in the >>>>> mobile but message is not 160 characters its less. >>>>> >>>>> In my conversion I convert ? to %10 and so on. >>>>> >>>>> I even tried to add to each smsc configuration alt-charset. I tried >>>>> values like iso8859-1 and LATIN1 but no luck. >>>>> >>>>> Everything looks right to me, and I cannot see why it doesn?t work >>>>> since everyone else claims that it should be that way >>>>> >>>>> I have read each and every post regarding encoding.............. >>>>> >>>>> >>>>> >>>>> >>>> You might want to try a patch for charset.c (kludge as Stipe Tolj >>>> delicately put it) in a thread called ``CIMD 2.0 & Greek'' between >>>> Kyriacos Sakkas, Stipe and myself that just passes through greek >>>> chars for GSM03.38 unaffected. >>>> As far as I know, it works just fine for the two of us using it, >>>> myself with 1.4.1 . YMMV >>>> >>>> Thanos Chatziathanassiou >>>> >>>> >>>> >>>> >>>>> Thank you very much >>>>> >>>>> Dinos >>>>> >>>>> *From:* ???????? ????????????? [mailto:[EMAIL PROTECTED] >>>>> *Sent:* Thursday, July 19, 2007 9:14 PM >>>>> *To:* ???????????? ???????? >>>>> *Subject:* RE: CANT SEND GREEK CHARACTERS >>>>> >>>>> Here goes nothing ... >>>>> >>>>> Greek is not straightforward in any way ... there is a way to send >>>>> text in 7-bit and in UCS-2. >>>>> >>>>> Greek capital characters are in the GSM0338 set so you can use them >>>>> to send 7bit (encoding 0) or up to 160 characters per message, but >>>>> you need to convert the Greek capital letters that do not exist in >>>>> the set to their equivalent Latin characters, and you need to make >>>>> sure that the whole message is in caps for the Greek letters >>>>> >>>>> Sending Greek text without GSM0338 conversion means that you need >>>>> to use UCS-2 (encoding = 2) to send the messages or up to 70 >>>>> characters per message. >>>>> >>>>> The actual encoding of your web page is irrelevant ... Since you >>>>> need to do hard core conversion to GSM0338 or a light conversion to >>>>> UCS-2 you are free to choose the source encoding of your page. >>>>> Admittedly using >>>>> UTF8 is the most convenient way, but then that might be just me ... >>>>> >>>>> Finally what you need to put in kannel is again irrelevant since >>>>> you would need to do some conversion by hand before passing it on >>>>> to kannel for transmission. >>>>> >>>>> If the above is not clear feel free to contact me. I don?t charge >>>>> that much per hour ;-) >>>>> >>>>> *Dimitris Evmorfopoulos* >>>>> >>>>> ------------------------------------------------------------------- >>>>> -- >>>>> --- >>>>> >>>>> *From:* ???????????? ???????? [mailto:[EMAIL PROTECTED] >>>>> *Sent:* Thursday, July 19, 2007 8:16 PM >>>>> *To:* [email protected] >>>>> *Subject:* CANT SEND GREEK CHARACTERS >>>>> >>>>> Hello, >>>>> >>>>> I am trying to send greek characters with kannel. >>>>> >>>>> I have tried using 1.4.1 and CVS version which I suppose they >>>>> require different encodings... >>>>> >>>>> Can somebody help me clear things in my mind.... >>>>> >>>>> I need to know the following if possible: >>>>> >>>>> 1. the encoding my webpage must have >>>>> >>>>> 2. what coding I need to set for kannel >>>>> >>>>> 3. If I need to put in kannel.conf any charset values (iso-8859-1, >>>>> utf, e.t.c) >>>>> >>>>> I would like some answers of the above questions for both stable >>>>> release and CVS >>>>> >>>>> I have read documentation, and have tried almost any combination. >>>>> SMSC I use are both smpp and UCP/EMI >>>>> >>>>> Thank you very much in advance for your help >>>>> >>>>> Kind regards >>>>> >>>>> Dinos >>>>> >>>>> No virus found in this outgoing message. >>>>> Checked by AVG Free Edition. >>>>> Version: 7.5.476 / Virus Database: 269.10.9/907 - Release Date: >>>>> 18/7/2007 3:30 ?? >>>>> >>>>> No virus found in this incoming message. >>>>> Checked by AVG Free Edition. >>>>> Version: 7.5.476 / Virus Database: 269.10.10/908 - Release Date: >>>>> 19/7/2007 6:10 ?? >>>>> >>>>> >>>>> No virus found in this outgoing message. >>>>> Checked by AVG Free Edition. >>>>> Version: 7.5.476 / Virus Database: 269.11.2/931 - Release Date: >>>>> 1/8/2007 4:53 ?? >>>>> >>>>> >>>>> >>>>> >>>> No virus found in this incoming message. >>>> Checked by AVG Free Edition. >>>> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >>>> 2/8/2007 2:22 ii >>>> >>>> >>>> No virus found in this outgoing message. >>>> Checked by AVG Free Edition. >>>> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >>>> 2/8/2007 2:22 ii >>>> >>>> >>>> >>>> >>> No virus found in this incoming message. >>> Checked by AVG Free Edition. >>> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >>> 2/8/2007 2:22 ?? >>> >>> >>> >>> No virus found in this outgoing message. >>> Checked by AVG Free Edition. >>> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >>> 2/8/2007 2:22 ii >>> >>> >>> >>> >>> No virus found in this incoming message. >>> Checked by AVG Free Edition. >>> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >>> 2/8/2007 2:22 ii >>> >>> >>> No virus found in this outgoing message. >>> Checked by AVG Free Edition. >>> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >>> 2/8/2007 2:22 ii >>> >>> >>> >> >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >> 2/8/2007 2:22 ?? >> >> >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: >> 2/8/2007 2:22 ii >> >> > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: 2/8/2007 > 2:22 ?? > > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: 2/8/2007 > 2:22 ìì -- Thanks, Alex No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.11.2/933 - Release Date: 2/8/2007 2:22 ìì No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.11.8/940 - Release Date: 6/8/2007 4:53 ìì
