In message <[EMAIL PROTECTED]>
          "Stephen Howard" <[EMAIL PROTECTED]> wrote:

> right.  I had just keyed in on this from Tom's message:
> 
> "My code currently allows either set to provide the transform on the
> grounds that otherwise the unicode module would have to either know
> how to convert to everything else or from everything else."
> 
> ...which seemed to posit that Unicode module could be responsible for
> all the transcodings to and from it's own character set, which seemed
> backwards to me.

I was only positing it long enough to acknowledge that such a rule
was untenable.

What it comes down to is that there are three possibles rules, namely:

  1. Each character set defines transforms from itself to other
     character sets.

  2. Each character set defines transforms to itself from other
     character sets.

  3. Each character set defines transforms both from itself to
     other character sets and from other character sets to itself.

We have established that the first two will not work because of the
unicode problem.

That leaves the third, which is what I have implemented. When looking to
transcode from A to B it will first ask A if can it transcode to B and
if that fails then it will ask B if it can transcode from A.

That way each character set can manage it's own translations both to
and from unicode as we require.

The problem it raises is, whois reponsible for transcoding from ASCII to
Latin-1? and back again? If we're not careful both ends will implement
both translations and we will have effective duplication.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/

Reply via email to