The Archives

  • 06.Mar.09
    Accents everywhere (to be removed, obviously) scripts, shell | pfortuny | (2)
    Accents have again (I still live in Spain and do some work for the Spanish Administration) crept into my terminal. This time it was a group of University professors which had to create a lot of files and directories concerning a historical catalog and even though I remember telling the coordinator not to use accents or spaces or any funny characters, they did it. I should have known better... The problem was then to take away all spaces and non-ASCII characters from directory and file names. After thinking about it a bit, I came up with the solution below. There may be ...
  • 16.Feb.09
    Perl for accents and spaces in html hrefs automated, scripts, shell | pfortuny | (0)
    Despite the title looking like spam, it uses all the relevant keywords in a problem which I guess is more common than it looks like, especially in non-English speaking countries. I had created (automatically, not by hand) a set of html, pdf and rtf files of the 477 items of a regional catalogue of industrial estate (sorry, no references because it belongs to other people and they have not published it yet). Then I made the index.html page listing and linking to all those files. It looked like a list of lines like the following one (notice that what follows looks ...