Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Converting characters.

 [1/2] from: bga::din::uem::br at: 23-Jan-2001 21:16


Hello. I need to create a script that will convert a HTML page into a WML page. Most of the script is already working but I have a problem that I didn't figure out how to solve so I'm asking for help. The page I'm downloading is written in portuguese and there are lots of accented characters ("áéó", for instance) using the iso-8859-1 charset. What I need is a script that will search the entire page for all those special chars and change them to their non-accented counterparts (so "é" would become e ). What would be the best way to do it? Thanks. -Bruno -- Bruno G. Albuquerque [bga--din--uem--br] BeDevId #15362 Grupo Brasileiro de Usuários de BeOS - Presidente http://www.bug-br.org.br What the world *really* needs is a good Automatic Bicycle Sharpener.

 [2/2] from: emptyhead:home:nl at: 24-Jan-2001 0:41


This is the smallest I could come up with....
>> non-accent: func [text][ foreach [a b] "áaéeóo" [ replace/all text a b] ] >> non-accent "áéóáéó"
== "aeoaeo" Daan Oosterveld Bruno G. Albuquerque schreef: