From: Anton Gorlov <stalker@altlinux.ru>
To: ALT Linux sysadmins' discussion <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Отправка SMS через GSM-модем: как выбрать кодировку ?
Date: Sun, 3 Apr 2016 00:24:48 +0300
Message-ID: <570038A0.1030302@altlinux.ru> (raw)
In-Reply-To: <201604030038.38653.a_s_y@sama.ru>
Если не ошибаюсь - там UCS2 или что-то подобное используется.
Давно на перле ковырял скрипт под это дело
02.04.2016 23:38, Sergey пишет:
> Приветствую.
>
> Не знает ли кто, какая кодировка должна использоваться при отправке SMS, чтобы
> кирилица доходила ? Есть gnokii. Если сделать "cat тест | gnokii ...", то всё
> работает, когда из консоли (LANG=ru_RU.UTF-8). Хочется сделать на Perl и без
> gnokii (непонятные пока сложности с установкой локали при вызове из демона, а
> с POSIX вообще символы пропадают; но это отдельный вопрос). Есть такая штука:
> perl-SMS-Send и perl-SMS-Send-DeviceGsm. Там всё просто, на первый взгляд:
>
> my $sender = SMS::Send->new('DeviceGsm',
> _baudrate => '19200',.
> _port => '/dev/ttyUSB0',
> );
>
> my $sent = $sender->send_sms(
> text => $message,
> to => $phone,
> );
>
> Но просто, пока не доходит до кирилицы: текст портится. Пробовал utf8,
> koi8-r, cp866, iso-8859-5, windows-1251. С последними четырьмя из слова
> "тест" получаются 4 символа, так что, что-то восьмибитное, по идее...
>
> Huawei E169, МТС. Но, наверное, это не очень принципиально, раз с gnokii
> получается. Вообще, конечно, можно попробовать посмотреть вовнутрь gnokii,
> но, вдруг, не надо будет там копаться ?
>
next prev parent reply other threads:[~2016-04-02 21:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-02 20:38 Sergey
2016-04-02 21:24 ` Anton Gorlov [this message]
2016-04-02 21:30 ` Хихин Руслан
2016-04-03 7:58 ` Sergey
2016-04-03 7:28 ` Sergey
2016-04-03 7:57 ` Sergey
2016-04-03 8:06 ` Хихин Руслан
2016-04-03 9:02 ` Sergey
2016-04-04 6:18 ` Sergey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=570038A0.1030302@altlinux.ru \
--to=stalker@altlinux.ru \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git