On Fri, Apr 07, 2006 at 05:04:30PM +1000, Gary Capell wrote: > On Fri, Apr 07, 2006 at 07:57:11AM +0200, Ian Broster wrote: > > Is there no way to have a raw representation in memory and a best-effort > > UTF8 render/manipulation? > Of course there's a way (probably _lots_ of ways) to do it. > > The questions are: > * do any of the ways have negligible impact on code complexity > and efficiency (i.e. not requiring duplicate work on > two copies of buffers)? > > * do the costs (time to design/write, added time for future > work, efficiency cost, ... ) outweight the benefit > (can edit by hand binary files)? It is "possible" to edit binary files with wily like <some_quoting_filter --encode <file >some_quoting_filter --decode >file It is probably both easier and cleaner to write such a filter than to represent and special case invalid byte sequences inside wily. To convenience heavy usage it could be written as an rpc-client with BinGet and BinPut. I think valid perl code may contain null bytes, but that's a slightly different problem since that is valid utf. -- Tommy Pettersson <ptp@xxxxxxxxxxxxxx>