From: Brian Candler Date: 2009-08-08T04:48:43+09:00 Subject: Re: R1.9 mixed encoding in file V��t Ondruch wrote: > I know that for this particular case I could use directive on top of the > file, but I would like to see something in following manner: > > String.new 'zuf��llige_��lu��ou��k��', Encoding.CP852 It's not pretty, but str = "zuf\x84llige_\xA7lu\x9Cou\x9Fk\xEC".force_encoding("CP852") will probably do the job. -- Posted via http://www.ruby-forum.com/.