Re: Command "read -N " doesn't respect UTF-8 encoding

2020-10-24 Thread Lawrence Velázquez
> On Oct 24, 2020, at 3:51 PM, i...@kablex.ru wrote:
> 
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_$
> uname output: Linux bitrix-lamp 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 
> (2017-09-19) x86_64 GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
> 
> Bash Version: 4.3
> Patch Level: 30
> Release Status: release
> 
> Description:
>UTF-8 string piped to read command goes corrupt with -N option, e.g.
>  printf "привет"|(read -N 100500 var_text; printf  "$var_text" )
> returns some corrupt output "�#��#��#��#��#��#�"
>  while
>  printf "привет"|(read -n 100500 var_text; printf  "$var_text" )
> returns correct output "привет"
> 
> 
> Repeat-By:
>as described above

FWIW your test case seems to work fine with a modern bash.

% bash --version | head -n 1
GNU bash, version 5.0.17(1)-release (x86_64-apple-darwin18.7.0)
% bash --norc <<\EOF
heredoc> printf "привет"|(read -N 100500 var_text; printf "$var_text" )
heredoc> EOF
привет%


--
vq


Command "read -N " doesn't respect UTF-8 encoding

2020-10-24 Thread info
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_$
uname output: Linux bitrix-lamp 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 
(2017-09-19) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 30
Release Status: release

Description:
UTF-8 string piped to read command goes corrupt with -N option, e.g.
  printf "привет"|(read -N 100500 var_text; printf  "$var_text" )
 returns some corrupt output 
"�#��#��#��#��#��#�"
  while
  printf "привет"|(read -n 100500 var_text; printf  "$var_text" )
 returns correct output "привет"


Repeat-By:
as described above



Re: Typo in the bash man page

2020-10-24 Thread Chet Ramey
On 10/23/20 2:05 PM, Luc Ducazu wrote:

> Bash Version: 5.0
> Patch Level: 17
> Release Status: release
> 
> Description:
> Typo in section 'CONDITIONAL EXPRESSIONS'
> 
> Repeat-By:
> $ man bash
> 
> Fix:
> [...]The test  abd  [ commands  determine  their  behavior[...]
> Should be
> [...]The test  and  [ commands  determine  their  behavior[...]

Thanks for the report.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: issue with vredir6.sub and AIX - bash (sub-shell) is crashing durig manual replication of test

2020-10-24 Thread Michael Felt
OK. Thanks for the reply - and apologies for slow response.

I was expecting a summary of the test results. I thought the other
projects you lead ended with test summaries.

If you care to help me find where the wrong error number is being
returned I'll try and come up with a PR to fix this test for AIX. If
not, we can consider this thread 'closed'.

Sincerely,

Michael

On 16/10/2020 15:16, Chet Ramey wrote:
> On 10/16/20 6:31 AM, Michael Felt wrote:
>
>> OK. While - perhaps the root cause is differences in error-codes, or
>> something like that - and not to be overly concerned about (as I am not
>> with the UTF-8 'errors') I am concerned that 'make test' terminates at
>> this point - rather than continuing with the rest of the test suite.
> There is no "rest of the test suite." That is the last test script. Bash
> runs all the tests to completion.
>