Skip Menu |

This queue is for tickets about the Term-ReadLine-Gnu CPAN distribution.

Maintainer(s)' notes

When you report a bug, please provide the following information;

- output of
	perl -V
	perl Makefile.PL verbose
	make test TEST_VERBOSE=1
	perl -Mblib t/00checkver.t
	echo $TERM
- terminal emulator which you are using
- compiler which is used to compile the GNU Readline Library (libreadline.a) if you can know.
Read INSTALL in the distribution for more details.

Report information
The Basics
Id: 114185
Status: resolved
Priority: 0/
Queue: Term-ReadLine-Gnu

People
Owner: HAYASHI [...] cpan.org
Requestors: MAUKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.31
Fixed in: 1.32



Subject: t/utf8_binary.t fails with PERL_UNICODE=S
My PERL_UNICODE environment variable is set to "SAL" (and LANG=en_US.UTF-8). This (specifically the S) makes your module fail its tests. (Usually this indicates a missing 'binmode STDIN' or 'binmode STDOUT' somewhere.) $ PERL_UNICODE=S perl -Mblib t/utf8_binary.t 1..5 # Running under perl version 5.022001 for linux # Current time local: Thu May 5 11:00:31 2016 # Current time GMT: Thu May 5 09:00:31 2016 # Using Test.pm version 1.26 # I'm testing Term::ReadLine::Gnu version 1.31 ok 1 æ¼¢å­1 $VAR1 = 'æ¼¢å­1'; $VAR2 = 'æ¼¢å­1'; ok 2 #i: unix:perlio #o: unix:perlio:utf8 ok 3 #i: unix:perlio:stdio #o: unix:perlio:utf8 Show quoted text
漢字> 漢字2
漢字2 $VAR1 = "\x{6f22}\x{5b57}2"; $VAR2 = 'æ¼¢å­2'; not ok 4 # Failed test 4 in t/utf8_binary.t at line 74 # t/utf8_binary.t line 74 is: ok($line eq "æ¼¢å­2"); not ok 5 # Failed test 5 in t/utf8_binary.t at line 75 # t/utf8_binary.t line 75 is: ok(!utf8::is_utf8($line)); For comparison, without S: $ PERL_UNICODE=0 perl -Mblib t/utf8_binary.t 1..5 # Running under perl version 5.022001 for linux # Current time local: Thu May 5 11:01:02 2016 # Current time GMT: Thu May 5 09:01:02 2016 # Using Test.pm version 1.26 # I'm testing Term::ReadLine::Gnu version 1.31 ok 1 漢字1 $VAR1 = '漢字1'; $VAR2 = '漢字1'; ok 2 #i: unix:perlio #o: unix:perlio ok 3 #i: unix:perlio:stdio #o: unix:perlio:stdio Show quoted text
漢字> 漢字2
漢字2 $VAR1 = '漢字2'; $VAR2 = '漢字2'; ok 4 ok 5

Message body is not shown because it is too large.

Hi, Thank you for your report. On Thu, 5 May 2016 09:08:14 GMT, MAUKE wrote: Show quoted text
> My PERL_UNICODE environment variable is set to "SAL" (and > LANG=en_US.UTF-8). This (specifically the S) makes your module fail > its tests. (Usually this indicates a missing 'binmode STDIN' or > 'binmode STDOUT' somewhere.)
t/utf8_binary.t is a test which use UTF8 string as binary. It should fail if UTF8 string is converted to Perl internal UTF8 expression. On the other hand t/utf8_text.t is a test which you are expecting. Here is the fix. https://sourceforge.net/p/perl-trg/code/515/tree//trunk/t/utf8_binary.t?diff=512 Thanks!
I released 1.32. t/utf8_binary.t in 1.32 skips test if PERL_UNICODE environment variable is set. I tried to unset it in a BEGIN block, but it was to late, because opening IO is already done. I could not find a better way. Thanks.