#!/usr/bin/env python import cgi #import cgitb; cgitb.enable(); TEMPLATE = """
Ocrat Mirror → Animated Chinese Characters → Character search
Click on any Chinese character to see how to write it.
Introduction |
Here is the result of your search:%(content)sNot what you expected?Please make sure that your browser is set to use the Unicode (UTF-8) encoding. Any strings you copy and paste into the search box should be UTF-8 strings. |
http://lost-theory.org/ocrat/chargif |
""" + "".join(chars) + """
""").encode("utf-8") print TEMPLATE % dict(content=content) else: content = "No search string specified
" print TEMPLATE % dict(content=content) end_response()