File: eventhandler-utf-8

package info (click to toggle)
smstools 3.1.15-1.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 1,656 kB
  • ctags: 879
  • sloc: ansic: 14,857; sh: 1,195; php: 115; makefile: 48; awk: 17
file content (16 lines) | stat: -rwxr-xr-x 351 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# This sample converts a received message file from
# ISO to UTF-8 character set.

# After version 3.0.8 this is not needed.
# Use incoming_utf8 = yes in the modem settings.

case "$1" in
  SENT|RECEIVED|FAILED)
    FILE=`mktemp /tmp/smsd_XXXXXX`
    iconv -f ISO-8859-15 -t UTF-8  < $2 > $FILE
    mv $FILE $2
    chmod 644 $2
    ;;
esac