gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnokii charset in procmailrc


From: Anna Skorokhodova (Yandex)
Subject: Re: gnokii charset in procmailrc
Date: Fri, 29 Jun 2012 13:15:03 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1



On 29.06.2012 11:52, Baurzhan Ismagulov wrote:
On Fri, Jun 29, 2012 at 01:45:55AM +0400, Anna Skorokhodova (Yandex) wrote:
can't sendsms in russian via procmail
...
In shell everything is OK
...
but if i use gnokii in procmail i get (empty) body of sms while it's
in Rus (in Eng it delivers all text correctly)

locale is LANG=ru_RU.UTF-8

to reach the goal i send an e-mail to specially created account sms.
it's .procmailrc splits e-mail headers and gives parts to gnokii.
...
ucs2_encode/iconv: Invalid or incomplete multibyte or wide character
...
as you can find Subject field was correctly decoded from koi8-r MIME
to utf8.
The following could help:

* The data piped to gnokii (gzip if you send it here to avoid conversion
   by mail software),

* /usr/bin/locale output from the same environment gnokii is running in
   (i.e., sudo started from procmail, since sudo filters the
   environment for security).
to open the dev port
----------------
mail2:~$ cat /etc/group | grep gnokii
gnokii:x:117:nut,anita,sms

 mail2:~$ sudo cat /etc/sudoers | grep gnokii
%gnokii ALL=NOPASSWD: /usr/bin/gnokii

gnokii is running both cases under sms user environment
1) from sms user shell  2) from sms user .procmailrc
hmmm... you are right- the LANG is different (and i'm stuck in and do not know how to operate with it :( )

mail2:~$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

from .procmailrc
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

for shell call gnokii log gives
-------------------------
Received message type 23
General Data Coding
UCS-2
dcs: 0x08
Length: 0x2c
user_data_length: 0x2c
ValidityIndicator: 2
user_data: 0430002004410020043A043E043D0441043E043B0438003F002000280441043C002E0020043B043E04330029
Sending

for .procmailrc call
-------------------------
Received message type 23
ucs2_encode/iconv: Invalid or incomplete multibyte or wide character
General Data Coding
Default Alphabet
ucs2_encode/iconv: Invalid or incomplete multibyte or wide character
dcs: 0x00
Length: 0x00
user_data_length: 0x00
ValidityIndicator: 2
user_data:
Sending

i can't get success with iconv in procmailrc

:(



reply via email to

[Prev in Thread] Current Thread [Next in Thread]