bug-bash
[Top][All Lists]
Advanced

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

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


From: info
Subject: Command "read -N " doesn't respect UTF-8 encoding
Date: Sat, 24 Oct 2020 22:51:42 +0300

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]