| I'm trying to build an RSS feed that takes, in its item descriptions, 
| ISO-8859-1 text. (I'm using REXML for now.) I'd like to be able to take 
| a non-ASCII character and turn it into a usable XML entity. So, for 
| example, "\251" would get turned into "&#169"

Not exactly what you're asking for, but you could use Iconv to convert
ISO-8859-1 into UTF-8. It should be perfectly legal to include UTF-8
characters directly in XML, without turning them into character entities.

Alternatively, if it's sufficient to convert characters 160-255 straight
into numeric entity refs (which works if the top half of ISO-8859-1 maps
directly into Unicode, as I think it does), then how about

  a = "Copyright \251 2004"
  a.gsub!(/[\240-\377]/) { |c| "&#%d;" % c[0] }

  # => "Copyright © 2004"

Regards,

Brian.