On 01.10.2010 00:35, Rahul Thathoo wrote:
> I have a string consisting of 3 periods: "...". I want to convert it
> into a single utf-8 character http://www.fileformat.info/info/unicode/char/2026/index.htm
> 
> I tried Iconv.iconv('utf-8', 'iso-8859-1', '...') but that didnt
> work... any clues?

I think I'd simply go with:

ruby-1.9.2-p0 > puts "foo...bar".gsub!('...', "\u2026")
foo¡Äbar

I wouldn't except iconv() to know how to handle this. I'm not an expert
but I've never seen a conversion creating "multiple characters".
"Multiple bytes", yes, but not "characters".

HTH,
- Markus