Re: [PATCHv5 06/17] gitweb/lib - Simple select(FH) based output capture

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 7 Oct 2010 01:03, Ãvar ArnfjÃrà Bjarmason wrote:
> On Wed, Oct 6, 2010 at 22:01, Jakub Narebski <jnareb@xxxxxxxxx> wrote:
> 
> > * The most important issue is that I/O "layers" (PerlIO), like ':utf8'
> > Âor ':raw', are *already applied* to the output that is captured.
> > ÂThis means that captured output is *always* in binary (':raw') mode.
> > ÂIn Perl 6 language it means that data returned by capturing engine
> > Âis an equivalent of Buf, a collection of bytes, whether Buf or Str
> > Â(a colection of logical characters) is printed.
> 
> > + Â Â Â # note: this does not cover all cases
> > + Â Â Â binmode select(), ':utf8'
> > + Â Â Â Â Â Â Â if ((PerlIO::get_layers($self->{'oldfh'}))[-1] eq 'utf8');

Sidenote: I just realized that we can simply try to replay all but
special layers from 'oldfh'.
 
> I'm not sure but maybe we want to use ":Encoding(UTF-8)" everywhere in
> this series where you've used ":utf8". I.e. use the Encoding UTF-8
> layer instead of the internal utf8 layer.
> 
> It's more strict, see perldoc Encode's "UTF-8 vs. utf8 vs. UTF8". But
> maybe we don't care.

I think for the time being we don't care. 

In the future we could perhaps update gitweb to use ':encoding(UTF-8)'
PerlIO layer rather than ':utf8' layer, and update capturing engine(s)
appropriately.

-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]