ISO Latin -> HTML conversion
ben at co.and.co
ben at co.and.co
Sat Jul 8 13:12:13 EDT 2000
More information about the Python-list mailing list
Sat Jul 8 13:12:13 EDT 2000
- Previous message (by thread): ISO Latin -> HTML conversion
- Next message (by thread): ISO Latin -> HTML conversion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Danny Yee <danny at thrud.anatomy.usyd.edu.au> wrote: > 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? Just reverse the dictionnary, to be found in htmlentitydefs. Greeetings, -- ben . de . rydt at pandora . be ------------------ your comments http://users.pandora.be/bdr/ ------- inl. IPv6, Linux en Pandora
- Previous message (by thread): ISO Latin -> HTML conversion
- Next message (by thread): ISO Latin -> HTML conversion
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list