From: Krzysieq Date: 2008-09-17T21:44:48+09:00 Subject: Re: How to clean an xml files from non-utf-8 chars? ------=_Part_2063_32846357.1221655936289 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey, Thanks for inputs. So do You have another proposition? Cheers, Chris 2008/9/17 Rob Biedenharn > On Sep 17, 2008, at 5:15 AM, Brian Candler wrote: > > If you really don't care about the content: >> str.gsub(/[\x80-\xff]/,'?') >> -- >> > > > You can have bytes in that range as the first byte of a well-formed UTF-8 > Byte Sequence. They just can't represent a single byte. It's just not that > simple. > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob@AgileConsultingLLC.com > > > > ------=_Part_2063_32846357.1221655936289--