iphreeqc/encode_as_windows1252.sh
Darth Vader 35dec7bafc Squashed 'phreeqcpp/' changes from e7c12e1..b12de1f
b12de1f Added sleeps after curl -X POST
fb55642 working on SelectedOutput for BMI
a050758 Closes #48 -- Illegal character encoding in string literal (#49)

git-subtree-dir: phreeqcpp
git-subtree-split: b12de1f7f0eadb7b6153bffca9d0412801d2e132
2023-05-26 02:32:21 +00:00

7 lines
398 B
Bash
Executable File

#!/bin/sh
# see https://en.wikipedia.org/wiki/Windows-1252
# and https://en.wikipedia.org/wiki/ISO/IEC_8859
iconv --to-code=WINDOWS-1252 --from-code=UTF-8 print.cpp > print.windows-1252.cpp
grep -q '^// -\*- coding: windows-1252 -\*-$' print.windows-1252.cpp \
|| echo '// -*- coding: windows-1252 -*-' | cat - print.windows-1252.cpp > print.tmp.cpp \
&& mv print.tmp.cpp print.windows-1252.cpp