Bug 205973

Summary: comms/smstools3: internal UCS => UTF8 conversion not working
Product: Ports & Packages Reporter: DmitryBond <satorium77>
Component: Individual Port(s)Assignee: Guido Falsi <madpilot>
Status: Closed FIXED    
Severity: Affects Many People Keywords: needs-qa
Priority: --- Flags: madpilot: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205978
Attachments:
Description Flags
Proposed patch none

Description DmitryBond 2016-01-06 19:08:38 UTC
Hi

Internal charconv of smsd do not convert UCS messages to UTF8 when compiled using port supplied makefile.

How to reproduce:

1. install smsd from ports
2. add "incoming_utf8 = yes" and "decode_unicode_text = yes" to config file
3. send any sms with UCS encoding (containing any non ASCI symbols), for example this PDU contains word "Тест": 07919730070386F7240B919730612922F5000861106012949021080422043504410442 
4. check incoming directory and see, that instead of "Тест" received message body contains ""5AB"

How to fix:

1. install libiconv 
2. /usr/ports/comms/smstools3/work/smstools3/src/Makefile:

--#CFLAGS += -D USE_ICONV
++CFLAGS += -D USE_ICONV -liconv

3. recompile port
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2016-01-06 19:14:07 UTC
Hi,

Thanks for the suggestion.

I'm going to modify the port Makefile to use this strategy.

Please allow me some time to work out the needed patch and test it.
Comment 2 Guido Falsi freebsd_committer freebsd_triage 2016-01-17 14:55:59 UTC
Created attachment 165717 [details]
Proposed patch

Hi,

I've attached a patch addressing both this bug and bug 205978.

Can you test it and report back if it actually does what you expect?

Please note I have added UTF support as an optional knob, enabled by default.

Thanks in advance.
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2016-01-26 10:04:41 UTC
Hi, have you had a chance to test this patch?

Thanks!
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-11-02 11:30:06 UTC
A commit references this bug:

Author: madpilot
Date: Wed Nov  2 11:29:29 UTC 2016
New revision: 425138
URL: https://svnweb.freebsd.org/changeset/ports/425138

Log:
  - Add UTF8 option [1]
  - Patch sendsms script to correctly parse iconv command output [2]

  While here:

  - Add TIMESTAMP to distinfo
  - Regenerate patches
  - Unsilence post-install target

  PR:		205973 [1], 205978 [2]
  Submitted by:	satorium77@gmail.com

Changes:
  head/comms/smstools3/Makefile
  head/comms/smstools3/distinfo
  head/comms/smstools3/files/patch-Makefile
  head/comms/smstools3/files/patch-examples-smsd.conf.easy
  head/comms/smstools3/files/patch-install.sh
  head/comms/smstools3/files/patch-scripts_sendsms
  head/comms/smstools3/files/patch-src-Makefile
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2016-11-02 11:30:35 UTC
Changes committed. Thanks!