On Fri, Apr 07, 2006 at 07:57:11AM +0200, Ian Broster wrote:
>
> >I'm not sure this is a bug we want to fix? I'm guessing that this
> >is because (not surprisingly) some bits of /bin/echo aren't valid
> >UTF8.
>
> I see.
>
> However it does seem to break a rather fundamental assumption that a load
> then save will not corrupt the file.
Agreed. Hence the "ReadOnly" suggestion.
> Most text editors seem ok with binry files (presumably because the don't
> do UTF at all); despite the technical difficulties of doing so in wily, I
> think it's worth another think.
>
> >we'd have to maintain two copies of the file:
> >the version with valid UTF, and the original version with invalid
> >UTF.
>
> 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)?
--
Gary Capell <>
|