[ This is a sample file for converting BNC tagged text
/A "{CHR(13)}{CHR(10)}
{CHR(13)}{CHR(10)}" START
/T "*" -> "*"
/A "{CHR(13)}{CHR(10)}{CHR(13)}{CHR(10)}" END
[ additions to make output HTML-like for reading in browser
/F "" -> ""
[ cut the header if found within 25000 characters
[ /F means operate this change only in the First chunk of text
[ for additional speed
"{CHR(10)}" -> " "
"{CHR(13)}" -> " "
[ cut line-feeds and carriage returns (paragraphs are tagged)
/F " "{WRITTEN complete}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
/F " "{WRITTEN fragment}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
/F " "{SPOKEN complete}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
/F " "{SPOKEN fragment}{CHR(13)}{CHR(10)}{/HEAD}{BODY}<"
[ what kind of BNC text is this?
"¹" -> "1"
"²" -> "2"
"³" -> "3"
"?;?" -> "??"
[ replace character;character by charactercharacter
"&percnt" -> "%"
"©" -> "{CHR(169)}"
"&bull" -> " {CHR(42)} "
"Ê" -> "{CHR(202)}"
"ê" -> "{CHR(234)}"
"É" -> "{CHR(201)}"
"é" -> "{CHR(233)}"
"ö" -> "{CHR(246)}"
"ä" -> "{CHR(228)}"
"&ndash" -> "-"
"&mdash" -> "{CHR(151)}"
"&hellip" -> "-"
"&lsqb" -> "["
"&rsqb" -> "]"
"&ast" -> "{CHR(42)}"
"&equals" -> "="
"&percent" -> "%"
"&ins" -> "{CHR(34)}"
"&plus" -> "+"
"×" -> " X "
"&dollar" -> "$"
"£" -> "£"
""" -> """
"&bquo" -> """
"&equo" -> """
"&" -> "&"
[ convert various symbols (much more legible!)
"" -> "{CHR(13)}{CHR(10)}{p}"
"
" -> "{/p}{CHR(13)}{CHR(10)}"
"" -> "{CHR(13)}{CHR(10)}{h3}" {v="3"}
"" -> "{CHR(13)}{CHR(10)}{h2}" {v="2"}
"" -> "{/h{v}}{CHR(13)}{CHR(10)}"
"" -> "{*:}{CHR(9)}"
"" -> "{/p}{CHR(13)}{CHR(10)}"
[ "" -> "{section}{CHR(13)}{CHR(10)}"
"- " -> "{CHR(13)}{CHR(10)}{CHR(9)}"
[ carriage-return+line-feed at beginings & ends of paragraphs etc.
"<*>" -> ""
[ cut out ALL other tags!
"{" -> "<"
"}" -> ">"
[ restore any <> from {}
"" -> "{CHR(13)}{CHR(10)}"
"" -> "{CHR(13)}{CHR(10)}"
[ more HTML tags
/S
[ get rid of any surplus spaces
finish