Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Jan 2016 19:23:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 205978] comms/smstools3: sendsms script not compatible with FreeBSD iconv
Message-ID:  <bug-205978-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205978

            Bug ID: 205978
           Summary: comms/smstools3: sendsms script not compatible with
                    FreeBSD iconv
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: madpilot@FreeBSD.org
          Reporter: satorium77@gmail.com
          Assignee: madpilot@FreeBSD.org
             Flags: maintainer-feedback?(madpilot@FreeBSD.org)

Hi!

Sending SMS using sendsms script and UTF8 text as argument script not worki=
ng
as it should.

How to reproduce:

1. sendsms 7903xxxxxxx "=D1=82=D0=B5=D1=81=D1=82"
2. on mobile phone you will see something but not you're expecting

The reason of it is in this part of sendsms script:

ALPHABET=3D""
if which iconv > /dev/null 2>&1; then
  if ! $ECHO -n "$TEXT" | iconv -t ISO-8859-15 >/dev/null 2>&1; then
    ALPHABET=3D"Alphabet: UCS"
  fi
fi

iconv in FreeBSD returns 0 exit code even if there were some invalid chars,=
 so
"Alphabet: UCS" will never be set.

How to fix:

1. If there are some errors in conversion iconv in FreeBSD will return mess=
age
in stderr which can be parsed. So to fix this bug the code above should be
replaced with:

ALPHABET=3D""
if which iconv > /dev/null 2>&1; then
  if $ECHO -n "$TEXT" | iconv -t ISO-8859-15 2>&1 | grep "invalid" > /dev/n=
ull;
then
    ALPHABET=3D"Alphabet: UCS"
  fi
fi

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205978-13>