This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def latin1_to_html (unicrap): | |
"""This takes a UNICODE string and replaces Latin-1 characters with | |
something equivalent in html. It returns a plain ASCII string. | |
This function makes a best effort to convert Latin-1 characters into | |
ASCII equivalents. It does not just strip out the Latin-1 characters. | |
All characters in the standard 7-bit ASCII range are preserved. | |
In the 8th bit range all the Latin-1 accented letters are converted | |
to unaccented equivalents. Most symbol characters are converted to | |
something meaningful. Anything not converted is deleted. | |
""" |