From: Rob Biedenharn Date: 2008-09-17T21:26:19+09:00 Subject: Re: How to clean an xml files from non-utf-8 chars? 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