Hi,

At Wed, 13 Aug 2003 10:25:04 +0900,
Nikolai Weibull wrote:
> What I wan't to be able to do is
> input.tr!("\xf1", "n")
> where input contains unicode characters.  This doesn't seem to be
> possible.  String is only for ISO-8859-1 strings?  I feel I'm being
> stupid here, but sadly I don't know enough about UNICODE to be smart
> about it (I hope that makes sense ;-).  I guess I need to be tr'ing for
> \xc3\xb1 but that won't be possible.

If it is really in UTF-8,

  input.gsub!(/\xc3\xb1/u, "n")

or

  input.gsub!(/?/, "n") # with -Ku option.

-- 
Nobu Nakada