Hi,

At Mon, 16 Dec 2002 04:07:42 +0900,
Shannon Fang wrote:
> I used
> 
>     text.gsub!(/&#(\d+);/) do $1.to_i.chr end
> 
> to process it, and chr reported that 8217 is too large. I don't know if
> it is related to double-byte support? The entire article is in English,
> IE display is "don't" for the ’... although the apostrophe looks
> a little weird...

Integer#chr makes only single byte char.  If you want UTF8
string,

    text.gsub!(/&#(\d+);/) {[$1.to_i].pack("U")}

-- 
Nobu Nakada