On Mon, Feb 19, 2001 at 07:41:26PM -0600, Jarkko Hietaniemi wrote: > On Mon, Feb 19, 2001 at 08:33:37PM -0500, Andrew Pimlott wrote: > > On Mon, Feb 19, 2001 at 07:14:07PM -0600, Jarkko Hietaniemi wrote: > > > Protocols: if all I know is that my output is 500 Unicode characters > > > long, how am I to print out Content-Length? > > > > As I said to abigail, I would love a concrete explanation of what > > you have in mind. In particular, what is your mechanism for > > ensuring that perl is representing $output as utf8? > > Ahhh. True, got me there. I can't ensure that. *But* if you use bytes::length, it doesn't matter - you'll get the right answer whether or not $output is UTF8-encoded. Core's length, on the other hand, has to use character semantics because of the principle of least surprise, amongst other things. Hence the two have to exist, hence use bytes, QED. Thanks, Andrew. :) -- "I think i'll take my girlfriend to vegas for a win'98 burn/upgrade...." -- Megahal (trained on asr), 1998-11-06