ISO Latin -> HTML conversion

Danny Yee danny at thrud.anatomy.usyd.edu.au
Fri Jul 7 10:58:33 EDT 2000


I need to convert text with ISO Latin characters to HTML, e.g.
I want to map é to é and so forth.

I can do this by reading in a wopping big file
	('À', 'À'),
	('Á', 'Á'),
	('Â', 'Â'),
	('Ã', 'Ã'),
		.
		.

and then going
	for pair in fix_list:
		line = re.sub(pair[0], pair[1], line)
as I read each line... but there has to be something quicker than that,
surely.  Is there a fast way to do this?

Danny.






More information about the Python-list mailing list