Skip to content

Commit

Permalink
Announce 8bit utf-8 before I can figure out how to do QP in a shell s…
Browse files Browse the repository at this point in the history
…cript
  • Loading branch information
acli committed Aug 7, 2020
1 parent 57f63c2 commit d653d28
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Pnews.SH
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed mysel
# trn version
pnewsversion="trn$trnversion"
# Current output charset
charset=utf-8
if [ -n "$LC_CTYPE" ]; then
case "$LC_CTYPE" in
*.*) charset="`echo "$LC_CTYPE" | cut -d. -f2`"
esac
elif [ -n "$LC_ALL" ]; then
case "$LC_ALL" in
*.*) charset="`echo "$LC_ALL" | cut -d. -f2`"
esac
elif [ -n "$LANG" ]; then
case "$LANG" in
*.*) charset="`echo "$LANG" | cut -d. -f2`"
esac
fi
# System dependencies
mailer="\${RNMAILER-${mailer-/bin/mail}}"
Expand Down Expand Up @@ -637,6 +653,12 @@ EOH
/^X-Newsposter:/d;
/^[ ]*$/i\
X-Newsreader: '$pnewsversion'
/^[ ]*$/i\
Mime-Version: 1.0
/^[ ]*$/i\
Content-Type: text/plain; charset="'$charset'"
/^[ ]*$/i\
Content-Transfer-Encoding: 8bit
}'
case "$NNTPSERVER" in
local|'') share_connection=no;;
Expand Down

0 comments on commit d653d28

Please # to comment.