[PATCH] t/perf: correctly align non-ASCII descriptions in output

2017-04-21 Thread Ævar Arnfjörð Bjarmason
Change the test descriptions from being treated as binary blobs by perl to being treated as UTF-8. This ensures that e.g. a test description like "æ" is counted as 1 character, not 2. I have WIP performance tests for non-ASCII grep patterns on another topic that are affected by this. Now instead

Re: [PATCH] t/perf: correctly align non-ASCII descriptions in output

2017-04-21 Thread Jeff King
On Fri, Apr 21, 2017 at 07:44:28PM +, Ævar Arnfjörð Bjarmason wrote: > Change the test descriptions from being treated as binary blobs by > perl to being treated as UTF-8. This ensures that e.g. a test > description like "æ" is counted as 1 character, not 2. > > I have WIP performance tests f

Re: [PATCH] t/perf: correctly align non-ASCII descriptions in output

2017-04-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 21, 2017 at 10:41 PM, Jeff King wrote: > On Fri, Apr 21, 2017 at 07:44:28PM +, Ævar Arnfjörð Bjarmason wrote: > >> Change the test descriptions from being treated as binary blobs by >> perl to being treated as UTF-8. This ensures that e.g. a test >> description like "æ" is counted

Re: [PATCH] t/perf: correctly align non-ASCII descriptions in output

2017-04-21 Thread Jeff King
On Fri, Apr 21, 2017 at 11:28:42PM +0200, Ævar Arnfjörð Bjarmason wrote: > > I thought there was some "use" flag we could set to just make all of our > > handles utf8. But all I could come up with was stuff like PERLIO and > > "perl -C". Using binmode isn't too bad, though (I think you could > > j

Re: [PATCH] t/perf: correctly align non-ASCII descriptions in output

2017-04-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Apr 21, 2017 at 11:35 PM, Jeff King wrote: > On Fri, Apr 21, 2017 at 11:28:42PM +0200, Ævar Arnfjörð Bjarmason wrote: > >> > I thought there was some "use" flag we could set to just make all of our >> > handles utf8. But all I could come up with was stuff like PERLIO and >> > "perl -C". Us

Re: [PATCH] t/perf: correctly align non-ASCII descriptions in output

2017-04-21 Thread Jeff King
On Sat, Apr 22, 2017 at 12:02:02AM +0200, Ævar Arnfjörð Bjarmason wrote: > > Yeah, I know "use utf8" doesn't work for that, but I was thinking there > > was some other trick. Digging...ah, here it is: > > > > use open ':encoding(utf8)' > > > > No clue how portable that is. For such a small scrip