[Python-3000] struni and the Apple four-character-codes
Jeffrey Yasskin
jyasskin at gmail.com
Sun Jul 29 03:28:08 CEST 2007
On 7/27/07, Bob Ippolito <bob at redivi.com> wrote:
> On 7/27/07, Guido van Rossum <guido at python.org> wrote:
> > On 7/26/07, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
> > > On 7/26/07, Guido van Rossum <guido at python.org> wrote:
> > > > (Personally
> > > > I'd like to use strings for the keys since {'TEXT': 'stuff'} is a lot
> > > > clearer than {1413830740: 'stuff'} when encountered in a debugging
> > > > session.)
> > >
> > > Good argument. You now have a patch that uses str() instead of b2i().
> >
> > Hmm... That only works as long as the bytes are ASCII. Is that a
> > problem for aepack? Or are all its 4CCs chosen from a well-known set
> > that's all-ASCII?
>
> 4CCs are not all ASCII, they're Mac OS Roman. This is why in some of
> the C header files the constants turned into integers.
Good point; my second patch is wrong. I'm satisfied that b2i is
correct, even if it's not ideal from either a debugging or a "what are
4CCs really" perspective, so I don't intend to do any more work on it.
Would one of the mac enthusiasts like to take over from here?
More information about the Python-3000
mailing list