0

I am trying to display UTF-8 characters, in particular characters from the Tamil language, in the Rails Console.

Currently, my entries in my MongoDB database are displayed in the Rails console as follows: "_____".

On my Rails application, i.e. localhost, however, I see the actual Tamil characters: i.e. அம்மா.

Now I wonder what I can do to display the UTF-8 characters in the Rails console using a Windows machine. I have tried installing the 'rb-readline' gem, however, it is not solving my problem. Any suggestions?

soosap
  • 1,365
  • 2
  • 14
  • 30
  • [Unicode characters in Windows command line - how?](http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how) – Raj Jun 28 '14 at 12:56
  • I want to output my Tamil characters which are stored in the database in the Rails Console. Currently, I just see this "_____" blank string if I call it in the Rails Console. However, when I display it in my Rails Application (localhost) then it is displayed correctly. Researching online suggested installing the 'rb-readline' gem to fix it. However, it did not work out so far. I am not talking about the Windows command line. I am just using a windows machine in case that is of relevance to the problem. – soosap Jun 28 '14 at 13:09

1 Answers1

0

This isn't exactly a Rails issue. You might need to update the encoding of Windows command line.

Change the code page,

chcp 65001
Community
  • 1
  • 1
Raj
  • 22,346
  • 14
  • 99
  • 142
  • Ok, I thought the Rails Console and Windows Console are separate things. Either way, problem solved, thanks. – soosap Jun 28 '14 at 13:29