#!/bin/sh printf "Status: 500 Intentional Breakage\n" printf "Content-Type: " setvar charset = 'iso-8859-1' case (PATH_INFO) { *html* { printf "text/html" } *text* { printf "text/plain" } *charset* { printf "text/plain; charset=utf-8" setvar charset = 'utf-8' } *utf16* { printf "text/plain; charset=utf-16" setvar charset = 'utf-16' } *odd-spacing* { printf "text/plain; foo=bar ;charset=utf-16; other=nonsense" setvar charset = 'utf-16' } } printf "\n" printf "\n" printf "this is the error message\n" | iconv -f us-ascii -t $charset