From: nobu.nokada@... Date: 2003-08-15T13:51:31+09:00 Subject: Re: UTF-8 question Hi, At Wed, 13 Aug 2003 10:59:18 +0900, Nikolai Weibull wrote: > > If it is really in UTF-8, > > > > input.gsub!(/\xc3\xb1/u, "n") > > > > or > > > > input.gsub!(/�/, "n") # with -Ku option. > > > yeah, this works. The problem is - I would prefer tr(), as I could then > list other characters as well. It's a bitch having to give a long list > of gsub()'s. You can use jcode.rb. $ cat n.rb input = "hispa�ola" input.tr!("�", "n") p input $ iconv -f iso-8859-1 -t utf-8 n.rb | ruby -Ku "hispannola" $ iconv -f iso-8859-1 -t utf-8 n.rb | ruby -Ku -rjcode "hispanola" -- Nobu Nakada