aboutsummaryrefslogtreecommitdiff
path: root/htwrap
diff options
context:
space:
mode:
Diffstat (limited to 'htwrap')
-rwxr-xr-xhtwrap10
1 files changed, 7 insertions, 3 deletions
diff --git a/htwrap b/htwrap
index 97fa445..32f38aa 100755
--- a/htwrap
+++ b/htwrap
@@ -3,7 +3,7 @@ rfork E
# htwrap -- create standalone HTML document
-flagfmt='t, c charset, d dir, l lang, v doctype'
+flagfmt='t,C, c charset, d dir, l lang, v doctype'
args='[file ...]'
if(! ifs=() eval `{aux/getflags $*}){
@@ -39,8 +39,12 @@ if(! ~ $#flagl 0) echo -n ' lang="'^$flagl^'"'
if(! ~ $#flagd 0) echo -n ' dir="'^$flagd^'"'
echo '>'
-if(! ~ $#flagc 0)
- echo '<meta http-equiv="Content-Type" content="text/html; charset='^$flagc^'">'
+if(~ $#flagC 0){
+ if(! ~ $#flagc 0)
+ echo '<meta http-equiv="Content-Type" content="text/html; charset='^$flagc^'">'
+ if not
+ echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'
+}
fn source{
if(! ~ $#* 0)