Ruby Forum Ruby on Rails > Script/console UTF-8 MacOS X?

Posted by Philip Brocoum (stedwick)
on 09.05.2008 02:32
(Received via mailing list)
Is it possible to use foreign characters with UTF-8 encoding in the
console on MacOS X? I found a few OLD tutorials on the Internet and
none of them seemed to work. I'm using Leopard by the way. When I try
to paste in Chinese characters from AltaVista Babel Fish it just
starts beeping and nothing happens.
Posted by T K (Guest)
on 09.05.2008 17:27
(Received via mailing list)
On 5/9/08, Stedwick <philip.brocoum@gmail.com> wrote:
>
>  Is it possible to use foreign characters with UTF-8 encoding in the
>  console on MacOS X? I found a few OLD tutorials on the Internet and
>  none of them seemed to work. I'm using Leopard by the way. When I try
>  to paste in Chinese characters from AltaVista Babel Fish it just
>  starts beeping and nothing happens.

How is your question related to Ruby on Rails? What's foreign
caracters? English is very foreign to me. Also, please specify your
current settings of Terminal and what exactly you tried to paste.
Posted by Philip Brocoum (stedwick)
on 12.05.2008 00:07
(Received via mailing list)
I'm using the Ruby on rails plug-in called globalize. It works great
so far through the browser, but I would like to be able to mess with
it using the script/console command.

I went to AltaVista Babel Fish and translated some English text into
simplified Chinese. When I paste that into the MacOS X terminal it
works fine, but only in the bash shell not in the script/console. When
I try to paste simplified Chinese characters into the script/console
it just beeps and does nothing.

Chinese characters work fine when submitted using a form in a browser
(again translated with Babel Fish), so I know that globalize is
working, but I would like to be able to mess with it using the script/
console.

The $KCODE is set to UTF-8 and the MacOS X terminal preferences are
set to UTF-8 and the "escape non-ASCII characters" checkbox is NOT
checked. Again, pasting Chinese into the terminal works fine, it just
doesn't work when script/console is running.

It's not the end of the world of course, but I would appreciate any
ideas that you have :-)