Problem with cyrillic symbols in console

Posted by woto on Stack Overflow See other posts from Stack Overflow or by woto
Published on 2010-12-28T13:08:38Z Indexed on 2010/12/28 15:54 UTC
Read the original article Hit count: 124

Filed under:
|
|
|
|

Hi everyone, sorry for bad English. It's Ruby code.

s = "???????"

`touch #{s}`
`cat #{s}`
`cat < #{s}`

Can anybody tell why it's code fails? With

sh: cannot open ???????: No such file

But thic code works fine

s = "????????" 
`touch #{s}` 
`cat #{s}` 
`cat < #{s}` 

Problem is only when Russian symbol '?' in the word and with symobol '<'

woto@woto-work:/tmp$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

woto@woto-work:/tmp$ ruby -v 
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux] 

woto@woto-work:/tmp$ uname -a 
Linux woto-work 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 10:14:11 
UTC 2010 x86_64 GNU/Linux 

woto@woto-work:/tmp$ lsb_release -a 
No LSB modules are available. 
Distributor ID: Ubuntu 
Description:    Ubuntu 10.04.1 LTS 
Release:        10.04 
Codename:       lucid 

© Stack Overflow or respective owner

Related posts about ruby

Related posts about bash