# UTF8 input in Bourne shell does not work



## freepaddler (Jun 7, 2016)

Hello,

I'm finally switching to UTF-8 and noticed a strange behavior. The default shell (/bin/sh) does not allow UTF-8 input. Any other shells that I tested (csh, tcsh, bash) allow UTF-8 characters input, but not sh.
Here are my locale settings

```
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_TIME=C
LC_NUMERIC=C
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES=C
LC_ALL=
```
Trying to input Cyrillic characters I get only bells, while output is OK - I can see UTF-8. The same behavior in console and virtual terminals (putty, OS-X terminal).


----------



## aragats (Jun 7, 2016)

I always use `LANG=en_US.UTF-8` and it perfectly works with Cyrillic and Armenian characters.


----------



## freepaddler (Jun 7, 2016)

aragats said:


> I always use `LANG=en_US.UTF-8` and it perfectly works with Cyrillic and Armenian characters.



in every shell but /bin/sh, unfortunately
it seems sh does not  recognize multibyte characters


----------



## aragats (Jun 7, 2016)

It works in /bin/sh in FreeBSD 11-CURRENT. You may consider switching to it, it's pretty stable, I'm using it from last September.


----------

