From: Chris Hulan Date: 2006-06-23T06:12:21+09:00 Subject: Re: ascii representation of unicode string? darren kirby wrote: > Hello all. > > I am unpacking some unicode strings from a binary file. I have a string > like: > > "W\000M\000/\000T\000r\000a\000c\000k\000N\000u\000m\000b\000e\000r\000\000\000\003" > > and I need to turn it into: > > "WM/TrackNumber" > could try: myAscii = s.unpack('U'*s.length).select{|x| x >46}.collect{|x| x.chr}.to_s -- Posted via http://www.ruby-forum.com/.