From: Michael Schuerig Date: 2005-07-01T06:00:42+09:00 Subject: Re: Escape sequences for unicode chars? Eric Hodel wrote: > On 30 Jun 2005, at 13:15, Michael Schuerig wrote: >> Case in point is Horizontal Ellipsis, hex 2026. I thought this >> would be >> \x2026, but Ruby only takes the first two characters following \x >> into account. Is there some way to make Ruby cooperate? > > You need to encode it into UTF8 or similar: > > $ ruby -e 'puts "\342\200\246"' > ? > $ Thanks! Somehow I didn't expect this to work. Good that it does. I'm using hex "\xe2\x80\xa6" instead as that's what the nice (unixoid) unicode command line tool shows, among other things. Michael -- Michael Schuerig The Fifth Rider of the Apocalypse mailto:michael@schuerig.de is a programmer. http://www.schuerig.de/michael/